-fixes
[oweals/gnunet.git] / src / util / container_meta_data.c
index eb515e8fb500d6a840dc6e013990c734afff3b03..b1051c8b68875421389541d60cc9ee471a7f6ba2 100644 (file)
@@ -32,6 +32,8 @@
 #include <extractor.h>
 #include <zlib.h>
 
+#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
+
 /**
  * Meta data item.
  */
@@ -105,7 +107,7 @@ struct GNUNET_CONTAINER_MetaData
 
 /**
  * Create a fresh struct CONTAINER_MetaData token.
- * 
+ *
  * @return empty meta-data container
  */
 struct GNUNET_CONTAINER_MetaData *
@@ -251,7 +253,7 @@ GNUNET_CONTAINER_meta_data_test_equal (const struct GNUNET_CONTAINER_MetaData
  *        used in the main libextractor library and yielding
  *        meta data).
  * @param type libextractor-type describing the meta data
- * @param format basic format information about data 
+ * @param format basic format information about data
  * @param data_mime_type mime-type of data (not of the original file);
  *        can be NULL (if mime-type is not known)
  * @param data actual meta-data found
@@ -313,7 +315,8 @@ GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md,
   i->data = GNUNET_malloc (data_len);
   memcpy (i->data, data, data_len);
   /* change OS native dir separators to unix '/' and others to '_' */
-  if (type == EXTRACTOR_METATYPE_FILENAME)
+  if ( (type == EXTRACTOR_METATYPE_FILENAME) ||
+       (type == EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME) )
   {
     p = i->data;
     while ((*p != '\0') && (p < i->data + data_len))
@@ -339,7 +342,7 @@ GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md,
  *        used in the main libextractor library and yielding
  *        meta data).
  * @param type libextractor-type describing the meta data
- * @param format basic format information about data 
+ * @param format basic format information about data
  * @param data_mime_type mime-type of data (not of the original file);
  *        can be NULL (if mime-type is not known)
  * @param data actual meta-data found
@@ -587,7 +590,7 @@ GNUNET_CONTAINER_meta_data_get_thumbnail (const struct GNUNET_CONTAINER_MetaData
 
 /**
  * Duplicate struct GNUNET_CONTAINER_MetaData.
- * 
+ *
  * @param md what to duplicate
  * @return duplicate meta-data container
  */