diff options
author | Ting-Wei Lan <lantw@src.gnome.org> | 2016-12-05 01:37:01 +0800 |
---|---|---|
committer | David King <amigadave@amigadave.com> | 2017-06-20 09:26:09 +0100 |
commit | 7d603db8dd0eeceae618cd580156fe7f550bc5ff (patch) | |
tree | fff63c771e96b41c0bc6f3c8b1e1caf187107095 /libyelp/yelp-magic-decompressor.c | |
parent | 0a5da2f8b0c82d06361adef1d7c20159a690ac0c (diff) | |
download | yelp-7d603db8dd0eeceae618cd580156fe7f550bc5ff.tar.gz |
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
Diffstat (limited to 'libyelp/yelp-magic-decompressor.c')
-rw-r--r-- | 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 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; } |