Path: Unicode handling and tests for SanitizeFileName

This commit is contained in:
Connor McLaughlin
2022-07-30 21:46:14 +10:00
parent 12875cbcac
commit 89659db7ee
9 changed files with 131 additions and 51 deletions

View File

@ -703,9 +703,7 @@ std::optional<DiscRegion> System::GetRegionForPath(const char* image_path)
std::string System::GetGameSettingsPath(const std::string_view& game_serial)
{
std::string sanitized_serial(game_serial);
Path::SanitizeFileName(sanitized_serial);
const std::string sanitized_serial(Path::SanitizeFileName(game_serial));
return Path::Combine(EmuFolders::GameSettings, fmt::format("{}.ini", sanitized_serial));
}