Better compression detection
authorTomas Mlcoch <tmlcoch@redhat.com>
Thu, 22 Mar 2012 07:57:35 +0000 (08:57 +0100)
committerTomas Mlcoch <tmlcoch@redhat.com>
Thu, 22 Mar 2012 07:57:35 +0000 (08:57 +0100)
src/compression_wrapper.c

index e2a95b9..4937466 100644 (file)
@@ -85,6 +85,14 @@ CompressionType detect_compression(const char *filename)
         g_debug(MODULE"%s: Mime type not detected!", __func__);
     }
 
+
+    // Xml detection
+
+    if (type == UNKNOWN_COMPRESSION && g_str_has_suffix(filename, ".xml"))
+    {
+        type = NO_COMPRESSION;
+    }
+
     magic_close(myt);
 
     return type;