From 9f6261524b6305d0d718aed5ba6dd004d4f76810 Mon Sep 17 00:00:00 2001 From: "Daniel R." <47796739+polybiusproxy@users.noreply.github.com> Date: Fri, 29 Nov 2024 20:02:45 +0100 Subject: [PATCH] core: fix patch paths applying when no folder exists --- src/core/file_sys/fs.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/file_sys/fs.cpp b/src/core/file_sys/fs.cpp index 769940cf0..b6d0d188f 100644 --- a/src/core/file_sys/fs.cpp +++ b/src/core/file_sys/fs.cpp @@ -56,11 +56,12 @@ std::filesystem::path MntPoints::GetHostPath(std::string_view path, bool* is_rea std::filesystem::path host_path = mount->host_path / rel_path; std::filesystem::path patch_path = mount->host_path; patch_path += "-UPDATE"; - patch_path /= rel_path; - if ((corrected_path.starts_with("/app0") || corrected_path.starts_with("/hostapp")) && - std::filesystem::exists(patch_path)) { - return patch_path; + if (corrected_path.starts_with("/app0") || corrected_path.starts_with("/hostapp")) { + if (std::filesystem::exists(patch_path)) { + patch_path /= rel_path; + return patch_path; + } } if (!NeedsCaseInsensitiveSearch) {