mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-19 18:04:56 +00:00
initial dents support
This commit is contained in:
parent
0325e4795a
commit
49601f58ed
5 changed files with 128 additions and 24 deletions
|
@ -28,15 +28,13 @@ void MntPoints::UnmountAll() {
|
|||
std::string MntPoints::GetHostDirectory(const std::string& guest_directory) {
|
||||
std::scoped_lock lock{m_mutex};
|
||||
for (auto& pair : m_mnt_pairs) {
|
||||
if (pair.guest_path.starts_with(guest_directory)) {
|
||||
return pair.host_path + guest_directory;
|
||||
}
|
||||
}
|
||||
// hack for relative path , get app0 and assuming it goes from there
|
||||
for (auto& pair : m_mnt_pairs) {
|
||||
if (pair.guest_path.starts_with("/app0")) {
|
||||
// horrible code but it works :D
|
||||
int find = guest_directory.find(pair.guest_path);
|
||||
if (find == 0) {
|
||||
std::string npath =
|
||||
guest_directory.substr(pair.guest_path.size(), guest_directory.size() - 1);
|
||||
std::replace(pair.host_path.begin(), pair.host_path.end(), '\\', '/');
|
||||
return pair.host_path + guest_directory;
|
||||
return pair.host_path + npath;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue