Fix the translation of dest to DestW, having it be NULL vs "" has

different meanings for MoveFileEx.
This commit is contained in:
Aric Stewart 2005-09-07 09:23:34 +00:00 committed by Alexandre Julliard
parent bac6e12c05
commit 087de7d439
1 changed files with 7 additions and 1 deletions

View File

@ -1122,7 +1122,13 @@ BOOL WINAPI MoveFileExA( LPCSTR source, LPCSTR dest, DWORD flag )
BOOL ret; BOOL ret;
if (!(sourceW = FILE_name_AtoW( source, FALSE ))) return FALSE; if (!(sourceW = FILE_name_AtoW( source, FALSE ))) return FALSE;
if (!(destW = FILE_name_AtoW( dest, TRUE ))) return FALSE; if (dest)
{
if (!(destW = FILE_name_AtoW( dest, TRUE ))) return FALSE;
}
else
destW = NULL;
ret = MoveFileExW( sourceW, destW, flag ); ret = MoveFileExW( sourceW, destW, flag );
HeapFree( GetProcessHeap(), 0, destW ); HeapFree( GetProcessHeap(), 0, destW );
return ret; return ret;