diff options
author | Hoà V. DINH <dinh.viet.hoa@gmail.com> | 2015-01-22 21:39:34 -0800 |
---|---|---|
committer | Hoà V. DINH <dinh.viet.hoa@gmail.com> | 2015-01-22 21:39:34 -0800 |
commit | d45ce14d841e6555bf0b524cee12aa111155ffab (patch) | |
tree | 0ea54f678527b58985a666edbc910bfebc9d0caf | |
parent | 860ecfd058607b648be998dc9c2ffc2daa6b25bf (diff) |
Fixed CreateZipFileFromFolder() on win32.
-rw-r--r-- | src/core/zip/MCZip.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/zip/MCZip.cpp b/src/core/zip/MCZip.cpp index 334ec50b..a9879c9f 100644 --- a/src/core/zip/MCZip.cpp +++ b/src/core/zip/MCZip.cpp @@ -80,16 +80,16 @@ static ErrorCode addFile(zipFile file, String * path) HANDLE hFind = INVALID_HANDLE_VALUE; WIN32_FIND_DATA ffd; - hFind = FindFirstFile(wildcard->fileSystemRepresentation(), &ffd); + hFind = FindFirstFile(wildcard->unicodeCharacters(), &ffd); if (hFind == INVALID_HANDLE_VALUE) { return ErrorFile; } do { - if ((strcmp(ffd.cFileName, ".") == 0) || (strcmp(ffd.cFileName, "..") == 0)) { + if ((wcscmp(ffd.cFileName, L".") == 0) || (wcscmp(ffd.cFileName, L"..") == 0)) { continue; } - String * subpath = path->stringByAppendingPathComponent(String::stringWithFileSystemRepresentation(ffd.cFileName)); + String * subpath = path->stringByAppendingPathComponent(String::stringWithCharacters(ffd.cFileName)); addFile(file, subpath); } while (FindNextFile(hFind, &ffd) != 0); |