]> granicus.if.org Git - php/commitdiff
- If no compression was specified and we detect compression than simply set
authorMarcus Boerger <helly@php.net>
Thu, 5 Jan 2006 00:55:55 +0000 (00:55 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 5 Jan 2006 00:55:55 +0000 (00:55 +0000)
  compression mode.

ext/phar/phar.c

index 91eeeda4b41e4a22dfb21c4c63c9255c243152a5..11503a30cf854ebf8939b1087418314ab5d133e2 100644 (file)
@@ -286,6 +286,9 @@ static int phar_open_file(php_stream *fp, char *fname, int fname_len, char *alia
                PHAR_GET_VAL(buffer, entry.timestamp);
                PHAR_GET_VAL(buffer, entry.offset_within_phar);
                PHAR_GET_VAL(buffer, entry.compressed_filesize);
+               if (entry.uncompressed_filesize != entry.compressed_filesize) {
+                       compressed = 1;
+               }
                entry.crc_checked = 0;
                entry.filedata = NULL;
                if (entry.compressed_filesize < 9) {