From c7523db97f791a993168b3999e2508010cbaa8d2 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sat, 27 Jan 2007 19:42:37 +0000 Subject: [PATCH] - Cannot change stream here --- ext/phar/phar.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 22a523b68b4..e44efa36e3d 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -294,8 +294,7 @@ static int phar_get_entry_data(phar_entry_data **ret, char *fname, int fname_len if (entry->fp) { /* make a copy */ if (for_trunc) { - php_stream_close(entry->fp); - entry->fp = php_stream_fopen_tmpfile(); + php_stream_truncate_set_size(entry->fp, 0); entry->is_modified = 1; phar->is_modified = 1; /* reset file size */