[file-roller] treat application/octet-stream as unrecognized format



commit f06051d7e24925f208777b84997e4cc947fd3670
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Dec 13 17:53:09 2015 +0100

    treat application/octet-stream as unrecognized format

 src/glib-utils.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/glib-utils.c b/src/glib-utils.c
index 5788d65..6ccf33a 100644
--- a/src/glib-utils.c
+++ b/src/glib-utils.c
@@ -1203,7 +1203,10 @@ _g_mime_type_get_from_content (char  *buffer,
                const char * mime_type;
 
                mime_type = magic_buffer (magic, buffer, buffer_size);
-               if (mime_type)
+               if ((mime_type != NULL) && (strcmp (mime_type, "application/octet-stream") == 0))
+                       return NULL;
+
+               if (mime_type != NULL)
                        return mime_type;
 
                g_warning ("unable to detect filetype from magic: %s", magic_error (magic));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]