Fix MoveFileEx() flags in MSVCRT rename()/_wrename().

This commit is contained in:
Martin Wilck 2002-09-16 22:39:50 +00:00 committed by Alexandre Julliard
parent 31aefe4036
commit 27a91c782e
1 changed files with 2 additions and 2 deletions

View File

@ -2107,7 +2107,7 @@ int MSVCRT_wscanf(const WCHAR *format, ...)
int MSVCRT_rename(const char *oldpath,const char *newpath)
{
TRACE(":from %s to %s\n",oldpath,newpath);
if (MoveFileExA(oldpath, newpath, MOVEFILE_REPLACE_EXISTING))
if (MoveFileExA(oldpath, newpath, MOVEFILE_COPY_ALLOWED))
return 0;
TRACE(":failed (%ld)\n",GetLastError());
MSVCRT__set_errno(GetLastError());
@ -2120,7 +2120,7 @@ int MSVCRT_rename(const char *oldpath,const char *newpath)
int _wrename(const WCHAR *oldpath,const WCHAR *newpath)
{
TRACE(":from %s to %s\n",debugstr_w(oldpath),debugstr_w(newpath));
if (MoveFileExW(oldpath, newpath, MOVEFILE_REPLACE_EXISTING))
if (MoveFileExW(oldpath, newpath, MOVEFILE_COPY_ALLOWED))
return 0;
TRACE(":failed (%ld)\n",GetLastError());
MSVCRT__set_errno(GetLastError());