Skip to content

Commit d9799c7

Browse files
Masamune3210elad335
authored andcommitted
unpkg: use lexical path normalization for package entries
1 parent 54993de commit d9799c7

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

rpcs3/Crypto/unpkg.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -952,16 +952,7 @@ bool package_reader::fill_data(std::map<std::string, install_entry*>& all_instal
952952
default:
953953
{
954954
// TODO: check for valid utf8 characters
955-
std::error_code ec;
956-
std::filesystem::path normalized_path = std::filesystem::weakly_canonical(path, ec);
957-
958-
if (ec)
959-
{
960-
pkg_log.warning("Failed to canonicalize package path '%s' (%s); falling back to lexical normalization.", path, ec.message());
961-
normalized_path = std::filesystem::path(path).lexically_normal();
962-
}
963-
964-
const std::string true_path = normalized_path.string();
955+
const std::string true_path = std::filesystem::path(path).lexically_normal().string();
965956
if (true_path.empty())
966957
{
967958
num_failures++;

0 commit comments

Comments
 (0)