summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-12-16 17:47:29 +0100
committerGitHub <noreply@github.com>2023-12-16 17:47:29 +0100
commit360418f1a14cdbc39bd84231f56d4c1b57ee5e39 (patch)
tree362313094902d38e0a7dbab1193e543120e21483 /src/core/hle/service
parentMerge pull request #12344 from liamwhite/its-free-real-estate (diff)
parentImprove path splitting speed (diff)
downloadyuzu-360418f1a14cdbc39bd84231f56d4c1b57ee5e39.tar
yuzu-360418f1a14cdbc39bd84231f56d4c1b57ee5e39.tar.gz
yuzu-360418f1a14cdbc39bd84231f56d4c1b57ee5e39.tar.bz2
yuzu-360418f1a14cdbc39bd84231f56d4c1b57ee5e39.tar.lz
yuzu-360418f1a14cdbc39bd84231f56d4c1b57ee5e39.tar.xz
yuzu-360418f1a14cdbc39bd84231f56d4c1b57ee5e39.tar.zst
yuzu-360418f1a14cdbc39bd84231f56d4c1b57ee5e39.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index 508db7360..780f8c74d 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -104,11 +104,7 @@ Result VfsDirectoryServiceWrapper::CreateDirectory(const std::string& path_) con
const auto components = Common::FS::SplitPathComponents(path);
std::string relative_path;
for (const auto& component : components) {
- // Skip empty path components
- if (component.empty()) {
- continue;
- }
- relative_path = Common::FS::SanitizePath(relative_path + '/' + component);
+ relative_path = Common::FS::SanitizePath(fmt::format("{}/{}", relative_path, component));
auto new_dir = backing->CreateSubdirectory(relative_path);
if (new_dir == nullptr) {
// TODO(DarkLordZach): Find a better error code for this