mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-22 10:19:26 +00:00
Allow non-existing paths in vfs::retrieve
This commit is contained in:
parent
c887865d54
commit
68718361a7
1 changed files with 15 additions and 8 deletions
|
@ -364,14 +364,7 @@ std::string vfs::retrieve(std::string_view path, const vfs_directory* node, std:
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
{
|
{
|
||||||
if (path.starts_with("."))
|
if (path.starts_with(".") || path.empty())
|
||||||
{
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::string rpath = Emu.GetCallbacks().resolve_path(path);
|
|
||||||
|
|
||||||
if (rpath.empty())
|
|
||||||
{
|
{
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
@ -380,6 +373,20 @@ std::string vfs::retrieve(std::string_view path, const vfs_directory* node, std:
|
||||||
|
|
||||||
std::vector<std::string_view> mount_path_empty;
|
std::vector<std::string_view> mount_path_empty;
|
||||||
|
|
||||||
|
if (std::string res = vfs::retrieve(path, &table.root, &mount_path_empty); !res.empty())
|
||||||
|
{
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
mount_path_empty.clear();
|
||||||
|
|
||||||
|
const std::string rpath = Emu.GetCallbacks().resolve_path(path);
|
||||||
|
|
||||||
|
if (rpath.empty())
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
return vfs::retrieve(rpath, &table.root, &mount_path_empty);
|
return vfs::retrieve(rpath, &table.root, &mount_path_empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue