mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 06:33:21 +00:00
Windows/PathV2.inc: MoveFileEx() can behave like Posix's mv(1) to specify MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123686 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ac25e44d89
commit
8ee48c584d
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user