prevent crash

This commit is contained in:
Fire Cube 2025-05-24 11:49:34 +02:00
parent 3f99769345
commit beb0df9b72

View File

@ -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);
}