Get metadata for folders.
diff --git a/ChangeLog b/ChangeLog
index 2515d80..4f0f79f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2008-01-28  Linus Walleij <triad@df.lth.se>
 
+	* src/libmtp.c: LIBMTP_Get_Filemetadata() return metadata for
+	  folders (associations) too. There is really no reason why it
+	  shouldn't and it's good for use internally. 
+	  LIBMTP_Get_Filelisting_With_Callback() will still not return
+	  any associations however. We want to use the folder functions
+	  for that.
+
+2008-01-28  Linus Walleij <triad@df.lth.se>
+
 	* src/libmtp.h.in: withdraw LIBMTP_Set_Object_Parent() function,
 	  no known devices will support this.
 	* src/libmtp.c: dito. Fix up some problems with the 
diff --git a/src/libmtp.c b/src/libmtp.c
index 8864001..1ff50eb 100644
--- a/src/libmtp.c
+++ b/src/libmtp.c
@@ -2666,7 +2666,7 @@
 
 /**
  * This returns a long list of all files available
- * on the current MTP device. Typical usage:
+ * on the current MTP device. Folders will not be returned. Typical usage:
  *
  * <pre>
  * LIBMTP_file_t *filelist;
@@ -2860,6 +2860,10 @@
  * <code>LIBMTP_Get_Filelisting()</code> and cache the file, preferably
  * as an efficient data structure such as a hash list.
  *
+ * Incidentally this function will return metadata for
+ * a folder (association) as well, but this is not a proper use
+ * of it, it is intended for file manipulation, not folder manipulation.
+ *
  * @param device a pointer to the device to get the file metadata from.
  * @param fileid the object ID of the file that you want the metadata for.
  * @return a metadata entry on success or NULL on failure.
@@ -2888,12 +2892,6 @@
 
     oi = &params->objectinfo[i];
 
-    if (oi->ObjectFormat == PTP_OFC_Association) {
-      // MTP use thesis object format for folders which means
-      // these "files" will turn up on a folder listing instead.
-      return NULL;
-    }
-
     // Allocate a new file type
     file = LIBMTP_new_file_t();