[yelp] magic-decompressor: Fix handling of uncompressed info pages



commit 7d603db8dd0eeceae618cd580156fe7f550bc5ff
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Mon Dec 5 01:37:01 2016 +0800

    magic-decompressor: Fix handling of uncompressed info pages
    
    When an uncompressed info page is specified, function
    yelp_magic_decompressor_convert always returns G_CONVERTER_CONVERTED.
    This causes file loading to never be completed because function
    g_input_stream_read keeps waiting for new data until the converter
    returns G_CONVERTER_FINISHED.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=775603

 libyelp/yelp-magic-decompressor.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libyelp/yelp-magic-decompressor.c b/libyelp/yelp-magic-decompressor.c
index 506a6ae..5e7b493 100644
--- a/libyelp/yelp-magic-decompressor.c
+++ b/libyelp/yelp-magic-decompressor.c
@@ -166,6 +166,8 @@ yelp_magic_decompressor_convert (GConverter *converter,
     *bytes_read = txfer_size;
     *bytes_written = txfer_size;
     
+    if (flags & G_CONVERTER_INPUT_AT_END)
+        return G_CONVERTER_FINISHED;
     return G_CONVERTER_CONVERTED;
 }
 


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