From 68dd25a4a5fff48c7bfe6170663f8b8e93e02140 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 31 Jan 2023 19:45:33 +0100 Subject: [PATCH] Replace std::filesystem::u8path with TODO --- rpcs3/Crypto/unpkg.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rpcs3/Crypto/unpkg.cpp b/rpcs3/Crypto/unpkg.cpp index 3cf6aa7911..0dff8ce039 100644 --- a/rpcs3/Crypto/unpkg.cpp +++ b/rpcs3/Crypto/unpkg.cpp @@ -815,7 +815,15 @@ bool package_reader::fill_data(std::map& all_instal } default: { - const std::string true_path = std::filesystem::weakly_canonical(std::filesystem::u8path(path)).string(); + // TODO: check for valid utf8 characters + const std::string true_path = std::filesystem::weakly_canonical(path).string(); + if (true_path.empty()) + { + num_failures++; + pkg_log.error("Failed to get weakly_canonical path for '%s'", path); + break; + } + auto map_ptr = &*all_install_entries.try_emplace(true_path).first; m_install_entries.push_back({