revert copy patch.

This commit is contained in:
Ilia Alshanetsky 2005-03-27 15:52:49 +00:00
parent e707137ed3
commit f95651e338

View file

@ -1700,12 +1700,6 @@ PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC)
{ {
php_stream *srcstream = NULL, *deststream = NULL; php_stream *srcstream = NULL, *deststream = NULL;
int ret = FAILURE; int ret = FAILURE;
struct stat src_s, dest_s;
/* safety check to ensure that source & destination files are not the same file */
if (stat(src, &src_s) || (stat(dest, &dest_s) == 0 && src_s.st_ino == dest_s.st_ino)) {
return ret;
}
srcstream = php_stream_open_wrapper(src, "rb", STREAM_DISABLE_OPEN_BASEDIR | REPORT_ERRORS, NULL); srcstream = php_stream_open_wrapper(src, "rb", STREAM_DISABLE_OPEN_BASEDIR | REPORT_ERRORS, NULL);