mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 04:25:12 +00:00
prevent crash
This commit is contained in:
parent
3f99769345
commit
beb0df9b72
@ -31,11 +31,11 @@ public:
|
|||||||
|
|
||||||
const auto sys_modules_path = Common::FS::GetUserPath(Common::FS::PathType::SysModuleDir);
|
const auto sys_modules_path = Common::FS::GetUserPath(Common::FS::PathType::SysModuleDir);
|
||||||
|
|
||||||
const auto canonical_path = std::filesystem::canonical(path);
|
const auto abs_path = std::filesystem::absolute(path).lexically_normal();
|
||||||
const auto canonical_sys_path = std::filesystem::canonical(sys_modules_path);
|
const auto abs_sys_path = std::filesystem::absolute(sys_modules_path).lexically_normal();
|
||||||
|
|
||||||
const auto path_str = canonical_path.string();
|
const auto path_str = abs_path.string();
|
||||||
const auto sys_path_str = canonical_sys_path.string();
|
const auto sys_path_str = abs_sys_path.string();
|
||||||
|
|
||||||
return path_str.starts_with(sys_path_str);
|
return path_str.starts_with(sys_path_str);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user