In Windows uses the long path format also for rename to ensure that operation in very deep dirs don't fail.

This commit is contained in:
Andrea Mazzoleni 2013-01-27 18:52:26 +01:00
parent cc21721b2a
commit 21b0645170

View file

@ -660,7 +660,7 @@ int windows_rename(const char* a, const char* b)
* Is an atomic file rename (with overwrite) possible on Windows?
* http://stackoverflow.com/questions/167414/is-an-atomic-file-rename-with-overwrite-possible-on-windows
*/
if (!MoveFileExW(convert(a), u8tou16(b), MOVEFILE_REPLACE_EXISTING)) {
if (!MoveFileExW(convert(a), convert(b), MOVEFILE_REPLACE_EXISTING)) {
windows_errno(GetLastError());
return -1;
}