[gnome-software] Support the older gzip content type too



commit 56bdf71d0161de980cb38a0525a3a623075a0e38
Author: Richard Hughes <richard hughsie com>
Date:   Mon Sep 9 14:52:33 2013 +0100

    Support the older gzip content type too

 src/plugins/appstream-cache.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/appstream-cache.c b/src/plugins/appstream-cache.c
index b497c6b..97a282b 100644
--- a/src/plugins/appstream-cache.c
+++ b/src/plugins/appstream-cache.c
@@ -496,7 +496,8 @@ appstream_cache_parse_file (AppstreamCache *cache,
 
        /* decompress if required */
        content_type = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
-       if (g_strcmp0 (content_type, "application/gzip") == 0) {
+       if (g_strcmp0 (content_type, "application/gzip") == 0 ||
+           g_strcmp0 (content_type, "application/x-gzip") == 0) {
                converter = G_CONVERTER (g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP));
                stream_data = g_converter_input_stream_new (file_stream, converter);
        } else if (g_strcmp0 (content_type, "application/xml") == 0) {


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