From 05086cda3b87f43bfd93e03f19829b541406ce87 Mon Sep 17 00:00:00 2001 From: Foxxcoon Date: Sat, 7 Jan 2023 13:24:12 +0100 Subject: [PATCH] Fix #11126 --- rpcs3/Emu/System.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 0fc2eea173..e95c39acf9 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -3091,7 +3091,7 @@ bool Emulator::IsPathInsideDir(std::string_view path, std::string_view dir) cons { const std::string dir_path = GetCallbacks().resolve_path(dir); - return !dir_path.empty() && (GetCallbacks().resolve_path(path) + '/').starts_with(dir_path + '/'); + return !dir_path.empty() && (GetCallbacks().resolve_path(path) + '/').starts_with((dir_path.back() == '/') ? dir_path : (dir_path + '/')); }; const std::string& Emulator::GetFakeCat() const