Index: src/DefaultFileSystem.cpp |
=================================================================== |
--- a/src/DefaultFileSystem.cpp |
+++ b/src/DefaultFileSystem.cpp |
@@ -46,17 +46,17 @@ namespace |
{ |
} |
}; |
#ifdef WIN32 |
// Paths need to be converted from UTF-8 to UTF-16 on Windows. |
std::wstring NormalizePath(const std::string& path) |
{ |
- return Utils::ToUTF16String(path, path.length()); |
+ return Utils::ToUTF16String(path); |
} |
#define rename _wrename |
#define remove _wremove |
#else |
// POSIX systems: assume that file system encoding is UTF-8 and just use the |
// file paths as they are. |
#define NormalizePath(path) (path) |
@@ -155,17 +155,17 @@ std::string DefaultFileSystem::Resolve(c |
{ |
if (basePath == "") |
{ |
return path; |
} |
else |
{ |
#ifdef _WIN32 |
- if (PathIsRelative(Utils::ToUTF16String(path, path.length()).c_str())) |
+ if (PathIsRelative(NormalizePath(path).c_str())) |
#else |
if (path.length() && *path.begin() != PATH_SEPARATOR) |
#endif |
{ |
return basePath + PATH_SEPARATOR + path; |
} |
else |
{ |