[llvm-commits] [llvm] r123686 - /llvm/trunk/lib/Support/Windows/PathV2.inc

NAKAMURA Takumi geek4civic at gmail.com
Mon Jan 17 14:41:25 PST 2011


Author: chapuni
Date: Mon Jan 17 16:41:25 2011
New Revision: 123686

URL: http://llvm.org/viewvc/llvm-project?rev=123686&view=rev
Log:
Windows/PathV2.inc: MoveFileEx() can behave like Posix's mv(1) to specify MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING.

Modified:
    llvm/trunk/lib/Support/Windows/PathV2.inc

Modified: llvm/trunk/lib/Support/Windows/PathV2.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/PathV2.inc?rev=123686&r1=123685&r2=123686&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/PathV2.inc (original)
+++ llvm/trunk/lib/Support/Windows/PathV2.inc Mon Jan 17 16:41:25 2011
@@ -310,7 +310,8 @@
   if (error_code ec = UTF8ToUTF16(f, wide_from)) return ec;
   if (error_code ec = UTF8ToUTF16(t, wide_to)) return ec;
 
-  if (!::MoveFileW(wide_from.begin(), wide_to.begin()))
+  if (!::MoveFileExW(wide_from.begin(), wide_to.begin(),
+                     MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING))
     return windows_error(::GetLastError());
 
   return success;





More information about the llvm-commits mailing list