From 087de7d439ed35213be74cd6fd086b5cf8daecad Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Wed, 7 Sep 2005 09:23:34 +0000 Subject: [PATCH] Fix the translation of dest to DestW, having it be NULL vs "" has different meanings for MoveFileEx. --- dlls/kernel/path.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/kernel/path.c b/dlls/kernel/path.c index 36c41ae17f4..365bef3f060 100644 --- a/dlls/kernel/path.c +++ b/dlls/kernel/path.c @@ -1122,7 +1122,13 @@ BOOL WINAPI MoveFileExA( LPCSTR source, LPCSTR dest, DWORD flag ) BOOL ret; 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 ); HeapFree( GetProcessHeap(), 0, destW ); return ret;