From 21b0645170f1748f5b1da5a5b822a0a2955be35d Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 27 Jan 2013 18:52:26 +0100 Subject: [PATCH] In Windows uses the long path format also for rename to ensure that operation in very deep dirs don't fail. --- mingw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw.c b/mingw.c index 5682fa44..82b5b9f0 100644 --- a/mingw.c +++ b/mingw.c @@ -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; }