core: fix patch paths applying when no folder exists

This commit is contained in:
Daniel R. 2024-11-29 20:02:45 +01:00
parent d6d1ec4f22
commit 9f6261524b
No known key found for this signature in database
GPG key ID: B8ADC8F57BA18DBA

View file

@ -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) {