mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-29 14:53:18 +00:00
Separate Updates from Game Folder (#1026)
* separate updates implementation * clang format clang format clang format clang format clang hates me work please * hotfix: check for sfo file instead of the folder * tiny change * refactor * forgot to change this over * add review changes * use operator
This commit is contained in:
parent
29ad2eca62
commit
a588bc5da8
10 changed files with 135 additions and 12 deletions
|
@ -2,6 +2,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <algorithm>
|
||||
#include "common/config.h"
|
||||
#include "common/string_util.h"
|
||||
#include "core/file_sys/fs.h"
|
||||
|
||||
|
@ -53,7 +54,14 @@ std::filesystem::path MntPoints::GetHostPath(std::string_view guest_directory, b
|
|||
// Remove device (e.g /app0) from path to retrieve relative path.
|
||||
pos = mount->mount.size() + 1;
|
||||
const auto rel_path = std::string_view(corrected_path).substr(pos);
|
||||
const auto host_path = mount->host_path / rel_path;
|
||||
std::filesystem::path host_path = mount->host_path / rel_path;
|
||||
|
||||
std::filesystem::path patch_path = mount->host_path;
|
||||
patch_path += "-UPDATE";
|
||||
if (corrected_path.starts_with("/app0/") && std::filesystem::exists(patch_path / rel_path)) {
|
||||
host_path = patch_path / rel_path;
|
||||
}
|
||||
|
||||
if (!NeedsCaseInsensitiveSearch) {
|
||||
return host_path;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue