Browse Source

Do not create the destination file, if opening of the source file failed

during copy().
migration/unlabaled-1.1.2
Ilia Alshanetsky 24 years ago
parent
commit
687312be41
  1. 3
      ext/standard/file.c

3
ext/standard/file.c

@ -1883,6 +1883,9 @@ PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC)
srcstream = php_stream_open_wrapper(src, "rb",
ENFORCE_SAFE_MODE | REPORT_ERRORS,
NULL);
if (!srcstream)
return ret;
deststream = php_stream_open_wrapper(dest, "wb",
ENFORCE_SAFE_MODE | REPORT_ERRORS,

Loading…
Cancel
Save