Index: lib/Support/Windows/Path.inc =================================================================== --- lib/Support/Windows/Path.inc +++ lib/Support/Windows/Path.inc @@ -416,7 +416,7 @@ *reinterpret_cast(RenameInfoBuf.data()); RenameInfo.ReplaceIfExists = ReplaceIfExists; RenameInfo.RootDirectory = 0; - RenameInfo.FileNameLength = ToWide.size(); + RenameInfo.FileNameLength = (ToWide.size() * sizeof(wchar_t)); std::copy(ToWide.begin(), ToWide.end(), &RenameInfo.FileName[0]); SetLastError(ERROR_SUCCESS);