Commit e2225cb8 authored by Chen Bill's avatar Chen Bill Committed by GitHub

use wide character literal in SafeFileName (#2916)

parent fea2a562
...@@ -21,7 +21,7 @@ class FileSystem { ...@@ -21,7 +21,7 @@ class FileSystem {
public: public:
static void SafeFileName(wchar_t* wfile) { static void SafeFileName(wchar_t* wfile) {
while((wfile = std::wcspbrk(wfile, L"<>:\"/\\|?*")) != nullptr) while((wfile = std::wcspbrk(wfile, L"<>:\"/\\|?*")) != nullptr)
*wfile++ = '_'; *wfile++ = L'_';
} }
static bool IsFileExists(const wchar_t* wfile) { static bool IsFileExists(const wchar_t* wfile) {
...@@ -125,7 +125,7 @@ class FileSystem { ...@@ -125,7 +125,7 @@ class FileSystem {
public: public:
static void SafeFileName(wchar_t* wfile) { static void SafeFileName(wchar_t* wfile) {
while((wfile = std::wcspbrk(wfile, L"/")) != nullptr) while((wfile = std::wcspbrk(wfile, L"/")) != nullptr)
*wfile++ = '_'; *wfile++ = L'_';
} }
static bool IsFileExists(const char* file) { static bool IsFileExists(const char* file) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment