diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-01-17 22:41:25 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-01-17 22:41:25 +0000 |
commit | 53f893af548900d7b365aa5f08926655aaa7fdbd (patch) | |
tree | 718cb223b1dfdce80595e6caab86c5264025ae1d /llvm/lib/Support | |
parent | bb4ea1fef94f2fd2051a46cd2b732d4ec4319adb (diff) | |
download | bcm5719-llvm-53f893af548900d7b365aa5f08926655aaa7fdbd.tar.gz bcm5719-llvm-53f893af548900d7b365aa5f08926655aaa7fdbd.zip |
Windows/PathV2.inc: MoveFileEx() can behave like Posix's mv(1) to specify MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING.
llvm-svn: 123686
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/Windows/PathV2.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Support/Windows/PathV2.inc b/llvm/lib/Support/Windows/PathV2.inc index f4629a15c4b..a631bc6fbaa 100644 --- a/llvm/lib/Support/Windows/PathV2.inc +++ b/llvm/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; |