From 7d603db8dd0eeceae618cd580156fe7f550bc5ff Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Mon, 5 Dec 2016 01:37:01 +0800 Subject: 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 file changed, 2 insertions(+) (limited to 'libyelp') diff --git a/libyelp/yelp-magic-decompressor.c b/libyelp/yelp-magic-decompressor.c index 506a6ae8..5e7b493f 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; } -- cgit v1.2.1