*/
static int phar_postprocess_file(php_stream_wrapper *wrapper, int options, phar_entry_data *idata, php_uint32 crc32 TSRMLS_DC) /* {{{ */
{
- unsigned int crc = ~0;
+ php_uint32 crc = ~0;
int len = idata->internal_file->uncompressed_filesize;
char c;
off_t manifest_ftell, bufsize;
long offset;
php_uint32 copy, loc, new_manifest_count;
- unsigned int newcrc32;
+ php_uint32 newcrc32;
php_stream *file, *newfile, *compressedfile;
php_stream_filter *filter;
php_url *resource;
char *internal_file;
phar_entry_data *idata;
+ php_stream *fpf;
resource = php_url_parse(url);
}
}
idata->internal_file->flags |= PHAR_ENT_DELETED;
+ /* we need to "flush" the stream to save the newly deleted file on disk */
+ fpf = php_stream_alloc(&phar_ops, idata, NULL, "wb");
+ phar_flush(fpf TSRMLS_CC);
+ php_stream_close(fpf);
efree(idata);
efree(internal_file);
php_url_free(resource);