From 52bf72787f5b7316af03a75fcc6a767150a8dec5 Mon Sep 17 00:00:00 2001 From: raven02 Date: Thu, 18 Dec 2014 00:05:29 +0800 Subject: [PATCH] Revert VFS --- rpcs3/Emu/FS/VFS.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/FS/VFS.cpp b/rpcs3/Emu/FS/VFS.cpp index 01489759a6..d963d9c91f 100644 --- a/rpcs3/Emu/FS/VFS.cpp +++ b/rpcs3/Emu/FS/VFS.cpp @@ -32,12 +32,21 @@ std::string simplify_path(const std::string& path, bool is_dir) { std::vector path_blocks = simplify_path_blocks(path); + std::string result; + if (path_blocks.empty()) - return ""; + return result; - std::string result = fmt::merge(path_blocks, "/"); + if (is_dir) + { + result = fmt::merge(path_blocks, "/"); + } + else + { + result = fmt::merge(std::vector(path_blocks.begin(), path_blocks.end() - 1), "/") + path_blocks[path_blocks.size() - 1]; + } - return is_dir ? result + "/" : result; + return result; } VFS::~VFS()