default: /* failed to stat file, does not exist? */
return ret;
}
- if (php_stream_stat_path_ex(dest, PHP_STREAM_URL_STAT_QUIET, &dest_s, NULL) != 0) {
- goto safe_to_copy;
- }
if (S_ISDIR(src_s.sb.st_mode)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The first argument to copy() function cannot be a directory");
return FAILURE;
}
+ if (php_stream_stat_path_ex(dest, PHP_STREAM_URL_STAT_QUIET, &dest_s, NULL) != 0) {
+ goto safe_to_copy;
+ }
if (!src_s.sb.st_ino || !dest_s.sb.st_ino) {
goto no_stat;
}
--EXPECTF--
*** Test copy() function: Trying to create a copy of an existing dir ***
+
+Warning: copy(): The first argument to copy() function cannot be a directory in %s/copy_variation12.php on line %d
bool(false)
bool(false)
int(4096)
-int(0)
+
+Warning: filesize(): stat failed for %s/copy_copy_variation12 in %s/copy_variation12.php on line %d
+bool(false)
*** Done ***