We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e707137 commit f95651eCopy full SHA for f95651e
ext/standard/file.c
@@ -1700,12 +1700,6 @@ PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC)
1700
{
1701
php_stream *srcstream = NULL, *deststream = NULL;
1702
int ret = FAILURE;
1703
- struct stat src_s, dest_s;
1704
-
1705
- /* safety check to ensure that source & destination files are not the same file */
1706
- if (stat(src, &src_s) || (stat(dest, &dest_s) == 0 && src_s.st_ino == dest_s.st_ino)) {
1707
- return ret;
1708
- }
1709
1710
srcstream = php_stream_open_wrapper(src, "rb", STREAM_DISABLE_OPEN_BASEDIR | REPORT_ERRORS, NULL);
1711
0 commit comments