From: Greg Beaver Date: Thu, 24 Apr 2008 04:56:22 +0000 (+0000) Subject: fix break when uncompressed files are re-saved, fixes phar_copy.phpt test X-Git-Tag: RELEASE_2_0_0b1~233 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24d83fa7f8524a4cf5b0e72c05f245db5fd7d863;p=php fix break when uncompressed files are re-saved, fixes phar_copy.phpt test --- diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 4bb1d7e213..195fc7ab0c 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -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)) {