]> granicus.if.org Git - php/commitdiff
fix break when uncompressed files are re-saved, fixes phar_copy.phpt test
authorGreg Beaver <cellog@php.net>
Thu, 24 Apr 2008 04:56:22 +0000 (04:56 +0000)
committerGreg Beaver <cellog@php.net>
Thu, 24 Apr 2008 04:56:22 +0000 (04:56 +0000)
ext/phar/phar.c

index 4bb1d7e213ff8c9628d38c7ec12ff1081163d4b4..195fc7ab0c7b73410fc84d101de2d412005f83ee 100644 (file)
@@ -2258,6 +2258,10 @@ int phar_flush(phar_archive_data *phar, char *user_stub, long len, int convert,
 
                /* compress and rehash as necessary */
                if ((oldfile && !entry->is_modified) || entry->is_dir) {
+                       if (entry->fp_type == PHAR_UFP) {
+                               /* reset so we can copy the compressed data over */
+                               entry->fp_type = PHAR_FP;
+                       }
                        continue;
                }
                if (!phar_get_efp(entry, 0 TSRMLS_CC)) {