From 84753db574112c4f879e8ee372ba00b541782f91 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Wed, 12 Jan 2022 20:29:33 +0100 Subject: [PATCH] VFS: fix missing path deliminators --- rpcs3/Emu/VFS.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/VFS.cpp b/rpcs3/Emu/VFS.cpp index bc770e6074..65333fa916 100644 --- a/rpcs3/Emu/VFS.cpp +++ b/rpcs3/Emu/VFS.cpp @@ -49,7 +49,6 @@ bool vfs::mount(std::string_view vpath, std::string_view path) return false; } - const bool delim_suffixed = path.ends_with(fs::delim); std::string final_path = fs::resolve_path(path); if (final_path.empty()) @@ -58,7 +57,7 @@ bool vfs::mount(std::string_view vpath, std::string_view path) return false; } - if (!final_path.ends_with(fs::delim) && delim_suffixed) + if (!final_path.ends_with(fs::delim[0]) && !final_path.ends_with(fs::delim[1]) && (path.ends_with(fs::delim[0]) || path.ends_with(fs::delim[1]))) { final_path += '/'; } @@ -83,7 +82,7 @@ bool vfs::mount(std::string_view vpath, std::string_view path) { // Mounting completed list.back()->path = std::move(final_path); - vfs_log.notice("Mounted path \"%s\" to \"%s\"", vpath_backup, final_path); + vfs_log.notice("Mounted path \"%s\" to \"%s\"", vpath_backup, list.back()->path); return true; }