mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
PHAR should modify entry timestamp when it's modified
This commit is contained in:
parent
bc55a8eb9f
commit
7b113d789d
@ -458,8 +458,11 @@ static int phar_stream_flush(php_stream *stream TSRMLS_DC) /* {{{ */
|
|||||||
{
|
{
|
||||||
char *error;
|
char *error;
|
||||||
int ret;
|
int ret;
|
||||||
if (stream->mode[0] == 'w' || (stream->mode[0] == 'r' && stream->mode[1] == '+')) {
|
phar_entry_data *data = (phar_entry_data *) stream->abstract;
|
||||||
ret = phar_flush(((phar_entry_data *)stream->abstract)->phar, 0, 0, 0, &error TSRMLS_CC);
|
|
||||||
|
if (data->internal_file->is_modified) {
|
||||||
|
data->internal_file->timestamp = time(0);
|
||||||
|
ret = phar_flush(data->phar, 0, 0, 0, &error TSRMLS_CC);
|
||||||
if (error) {
|
if (error) {
|
||||||
php_stream_wrapper_log_error(stream->wrapper, REPORT_ERRORS TSRMLS_CC, "%s", error);
|
php_stream_wrapper_log_error(stream->wrapper, REPORT_ERRORS TSRMLS_CC, "%s", error);
|
||||||
efree(error);
|
efree(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user