diff options
author | Pierre Joye <pajoye@php.net> | 2009-07-06 08:56:23 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2009-07-06 08:56:23 +0000 |
commit | fa382678335fe687ddf7d49c60ca9bbaaf898903 (patch) | |
tree | abc4d11150b4c2e82830c11b2bbb91864e7e1c43 /TSRM | |
parent | dac8acd1c1f9152390af530b918ce0a93aef0cae (diff) | |
download | php-git-fa382678335fe687ddf7d49c60ca9bbaaf898903.tar.gz |
- MFH: #48771, rename() between drives error: No error
Diffstat (limited to 'TSRM')
-rw-r--r-- | TSRM/tsrm_virtual_cwd.c | 2 | ||||
-rw-r--r-- | TSRM/tsrm_virtual_cwd.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 7b33b02048..9bfecd056c 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -1371,7 +1371,7 @@ CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC) /* {{{ */ /* rename on windows will fail if newname already exists. MoveFileEx has to be used */ #ifdef TSRM_WIN32 - retval = (MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING) == 0) ? -1 : 0; + retval = (MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED) == 0) ? -1 : 0; #else retval = rename(oldname, newname); #endif diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h index 8ddbee6f0f..bc8f75d13d 100644 --- a/TSRM/tsrm_virtual_cwd.h +++ b/TSRM/tsrm_virtual_cwd.h @@ -288,7 +288,7 @@ CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_ /* rename on windows will fail if newname already exists. MoveFileEx has to be used */ #if defined(TSRM_WIN32) -# define VCWD_RENAME(oldname, newname) (MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING) == 0 ? -1 : 0) +# define VCWD_RENAME(oldname, newname) (MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED) == 0 ? -1 : 0) #else # define VCWD_RENAME(oldname, newname) rename(oldname, newname) #endif |