projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac25e44
)
Windows/PathV2.inc: MoveFileEx() can behave like Posix's mv(1) to specify MOVEFILE_CO...
author
NAKAMURA Takumi
<geek4civic@gmail.com>
Mon, 17 Jan 2011 22:41:25 +0000
(22:41 +0000)
committer
NAKAMURA Takumi
<geek4civic@gmail.com>
Mon, 17 Jan 2011 22:41:25 +0000
(22:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123686
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/Windows/PathV2.inc
patch
|
blob
|
history
diff --git
a/lib/Support/Windows/PathV2.inc
b/lib/Support/Windows/PathV2.inc
index f4629a15c4b552d24079152df76583d28f0c5143..a631bc6fbaaf9c5abd6fa8d336a7b64b6cadf1cd 100644
(file)
--- a/
lib/Support/Windows/PathV2.inc
+++ b/
lib/Support/Windows/PathV2.inc
@@
-310,7
+310,8
@@
error_code rename(const Twine &from, const Twine &to) {
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;