mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 18:28:35 +12:00
Fix Emulator::IsPathInsideDir
This commit is contained in:
parent
3e84a2acc0
commit
5736fa3351
1 changed files with 3 additions and 1 deletions
|
@ -1903,7 +1903,9 @@ std::set<std::string> Emulator::GetGameDirs() const
|
||||||
|
|
||||||
bool Emulator::IsPathInsideDir(std::string_view path, std::string_view dir) const
|
bool Emulator::IsPathInsideDir(std::string_view path, std::string_view dir) const
|
||||||
{
|
{
|
||||||
return (GetCallbacks().resolve_path(path) + '/').starts_with(GetCallbacks().resolve_path(dir) + '/');
|
const std::string dir_path = GetCallbacks().resolve_path(dir);
|
||||||
|
|
||||||
|
return !dir_path.empty() && (GetCallbacks().resolve_path(path) + '/').starts_with(dir_path + '/');
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::string& Emulator::GetFakeCat() const
|
const std::string& Emulator::GetFakeCat() const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue