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