fix #41989 (move_uploaded_file() & relative path in ZTS mode)

This commit is contained in:
Antony Dovgal 2007-07-19 15:56:33 +00:00
parent 3f319ed27e
commit 3e72a3636e

View file

@ -6038,7 +6038,7 @@ PHP_FUNCTION(move_uploaded_file)
} }
VCWD_UNLINK(new_path); VCWD_UNLINK(new_path);
if (rename(old_path, new_path) == 0) { if (VCWD_RENAME(old_path, new_path) == 0) {
successful = 1; successful = 1;
} else if (php_copy_file_ex(old_path, new_path, STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) { } else if (php_copy_file_ex(old_path, new_path, STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) {
VCWD_UNLINK(old_path); VCWD_UNLINK(old_path);