diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2021-02-22 23:14:05 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-03-01 09:35:55 +0000 |
commit | 4986a1248dcdb6f32a22321154dc26898f10d3ab (patch) | |
tree | 783efcd77433357b9ac5929304e5d3af866ad02c /win32 | |
parent | 89fc5eaae6d0e8b348fdd1933d9df60cf3e5011b (diff) | |
download | busybox-w32-4986a1248dcdb6f32a22321154dc26898f10d3ab.tar.gz busybox-w32-4986a1248dcdb6f32a22321154dc26898f10d3ab.tar.bz2 busybox-w32-4986a1248dcdb6f32a22321154dc26898f10d3ab.zip |
Allow `rename()` to work across drives
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'win32')
-rw-r--r-- | win32/mingw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/win32/mingw.c b/win32/mingw.c index 443566a60..a222e6226 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -842,7 +842,8 @@ int mingw_rename(const char *pold, const char *pnew) | |||
842 | if (errno != EEXIST) | 842 | if (errno != EEXIST) |
843 | return -1; | 843 | return -1; |
844 | } | 844 | } |
845 | if (MoveFileEx(pold, pnew, MOVEFILE_REPLACE_EXISTING)) | 845 | if (MoveFileEx(pold, pnew, |
846 | MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED)) | ||
846 | return 0; | 847 | return 0; |
847 | /* TODO: translate more errors */ | 848 | /* TODO: translate more errors */ |
848 | if (GetLastError() == ERROR_ACCESS_DENIED && | 849 | if (GetLastError() == ERROR_ACCESS_DENIED && |