From beb0df9b72127d837c2e311d398d91b365474313 Mon Sep 17 00:00:00 2001 From: Fire Cube Date: Sat, 24 May 2025 11:49:34 +0200 Subject: [PATCH] prevent crash --- src/core/devtools/widget/module_list.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/devtools/widget/module_list.h b/src/core/devtools/widget/module_list.h index b8feeb160..f1ef2f517 100644 --- a/src/core/devtools/widget/module_list.h +++ b/src/core/devtools/widget/module_list.h @@ -31,11 +31,11 @@ public: const auto sys_modules_path = Common::FS::GetUserPath(Common::FS::PathType::SysModuleDir); - const auto canonical_path = std::filesystem::canonical(path); - const auto canonical_sys_path = std::filesystem::canonical(sys_modules_path); + const auto abs_path = std::filesystem::absolute(path).lexically_normal(); + const auto abs_sys_path = std::filesystem::absolute(sys_modules_path).lexically_normal(); - const auto path_str = canonical_path.string(); - const auto sys_path_str = canonical_sys_path.string(); + const auto path_str = abs_path.string(); + const auto sys_path_str = abs_sys_path.string(); return path_str.starts_with(sys_path_str); }