diff --git a/internal/platform/implementation/windows/file_path.cc b/internal/platform/implementation/windows/file_path.cc index 3e3c5061..a9b3d1f6 100644 --- a/internal/platform/implementation/windows/file_path.cc +++ b/internal/platform/implementation/windows/file_path.cc @@ -57,6 +57,8 @@ constexpr std::wstring_view kForbiddenPathNames[] = { L"COM5", L"COM6", L"COM7", L"COM8", L"COM9", L"LPT1", L"LPT2", L"LPT3", L"LPT4", L"LPT5", L"LPT6", L"LPT7", L"LPT8", L"LPT9"}; +constexpr char kIllegalFileCharacters[] = {':', '*', '?', '\"', '<', '>', '|'}; + std::wstring FilePath::GetCustomSavePath(std::wstring parent_folder, std::wstring file_name) { std::wstring path; @@ -257,8 +259,6 @@ void FilePath::SanitizePath(std::wstring& path) { ReplaceInvalidCharacters(path); } -char kIllegalFileCharacters[] = {'?', '*', '\'', '<', '>', '|', ':'}; - void FilePath::ReplaceInvalidCharacters(std::wstring& path) { auto it = path.begin(); it += 2; // Skip the 'C:' or any other drive specifier