mirror of
https://github.com/php/php-src.git
synced 2024-09-23 19:07:26 +00:00
fix unlink
This commit is contained in:
parent
420effc193
commit
e34af34365
@ -2248,10 +2248,14 @@ static int phar_unlink(php_stream_wrapper *wrapper, char *url, int options, php_
|
||||
}
|
||||
idata->internal_file->flags |= PHAR_ENT_DELETED;
|
||||
efree(internal_file);
|
||||
php_url_free(resource);
|
||||
idata->internal_file = 0;
|
||||
efree(idata);
|
||||
/* we need to "flush" the stream to save the newly deleted file on disk */
|
||||
idata = (phar_entry_data *) emalloc(sizeof(phar_entry_data));
|
||||
idata->fp = 0;
|
||||
idata->phar = phar_get_archive(resource->host, strlen(resource->host), 0, 0 TSRMLS_CC);
|
||||
do_phar_flush(idata TSRMLS_CC);
|
||||
php_url_free(resource);
|
||||
efree(idata);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user