From b28e5fa34797986547c6d89d78f8d28dc9d77ee1 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 8 Nov 2017 11:27:05 +0100 Subject: [PATCH] Avoid forbidden characters when extracting disc partitions We shouldn't try to create folder names that contain characters such as : or / since they are forbidden or have special meanings. (No officially released disc uses such characters, though.) --- Source/Core/DiscIO/DiscExtractor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DiscIO/DiscExtractor.cpp b/Source/Core/DiscIO/DiscExtractor.cpp index e4f52713a5..f254be68ca 100644 --- a/Source/Core/DiscIO/DiscExtractor.cpp +++ b/Source/Core/DiscIO/DiscExtractor.cpp @@ -33,7 +33,7 @@ std::string DirectoryNameForPartitionType(u32 partition_type) static_cast((partition_type >> 8) & 0xFF), static_cast(partition_type & 0xFF)}; if (std::all_of(type_as_game_id.cbegin(), type_as_game_id.cend(), - [](char c) { return std::isprint(c, std::locale::classic()); })) + [](char c) { return std::isalnum(c, std::locale::classic()); })) { return "P-" + type_as_game_id; }