Changeset 1585
- Timestamp:
- 05/06/10 15:43:50 (3 years ago)
- File:
-
- 1 edited
-
trunk/lib/ior-zlib.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/ior-zlib.c
r1521 r1585 107 107 (char*)DATA(io)->inbuff, 108 108 sizeof(DATA(io)->inbuff)); 109 if (bytes_read == 0) /* EOF */ 109 if (bytes_read == 0) { 110 /* EOF */ 111 if (DATA(io)->strm.avail_out == len) { 112 DATA(io)->err = ERR_EOF; 113 return 0; 114 } 115 /* Return how much data we've managed to read so far. */ 110 116 return len-DATA(io)->strm.avail_out; 117 } 111 118 if (bytes_read < 0) { /* Error */ 112 119 /* errno should be set */ … … 129 136 break; 130 137 case Z_STREAM_END: 131 DATA(io)->err = ERR_EOF; 138 /* You would think that an "EOF" on the stream would mean we'd 139 * want to pass on an EOF? Nope. Some tools (*cough* corel *cough*) 140 * annoyingly close and reopen the gzip stream leaving Z_STREAM_END 141 * mines for us to find. 142 */ 143 inflateEnd(&DATA(io)->strm); 144 inflateInit2(&DATA(io)->strm, 15 | 32); 145 DATA(io)->err = ERR_OK; 132 146 break; 133 147 default:
Note: See TracChangeset
for help on using the changeset viewer.
