mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 13:05:46 -04:00
Path: Unicode handling and tests for SanitizeFileName
This commit is contained in:
@ -1747,8 +1747,7 @@ const std::string& Achievements::GetAchievementBadgePath(const Achievement& achi
|
||||
return badge_path;
|
||||
|
||||
// well, this comes from the internet.... :)
|
||||
std::string clean_name(achievement.badge_name);
|
||||
Path::SanitizeFileName(clean_name);
|
||||
const std::string clean_name(Path::SanitizeFileName(achievement.badge_name));
|
||||
badge_path = Path::Combine(s_achievement_icon_cache_directory,
|
||||
fmt::format("{}{}.png", clean_name, achievement.locked ? "_lock" : ""));
|
||||
if (FileSystem::FileExists(badge_path.c_str()))
|
||||
|
@ -660,8 +660,7 @@ std::string GameList::GetNewCoverImagePathForEntry(const Entry* entry, const cha
|
||||
}
|
||||
|
||||
// Check for illegal characters, use serial instead.
|
||||
std::string sanitized_name(entry->title);
|
||||
Path::SanitizeFileName(sanitized_name);
|
||||
const std::string sanitized_name(Path::SanitizeFileName(entry->title));
|
||||
|
||||
std::string name;
|
||||
if (sanitized_name != entry->title)
|
||||
|
Reference in New Issue
Block a user