mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-13 16:18:56 +00:00
VFS: fix vfs::get
Escape each path element separately.
This commit is contained in:
parent
6c234b48ce
commit
6a8f5e6b38
@ -261,14 +261,20 @@ std::string vfs::get(std::string_view vpath, std::vector<std::string>* out_dir,
|
||||
return {};
|
||||
}
|
||||
|
||||
// Escape and merge path fragments
|
||||
// Merge path fragments
|
||||
if (out_path)
|
||||
{
|
||||
*out_path = "/";
|
||||
*out_path += fmt::merge(name_list, "/");
|
||||
}
|
||||
|
||||
return std::string{result_base} + vfs::escape(fmt::merge(result, "/"));
|
||||
// Escape for host FS
|
||||
std::vector<std::string> escaped;
|
||||
escaped.reserve(result.size());
|
||||
for (auto& sv : result)
|
||||
escaped.emplace_back(vfs::escape(sv));
|
||||
|
||||
return std::string{result_base} + fmt::merge(escaped, "/");
|
||||
}
|
||||
|
||||
#if __cpp_char8_t >= 201811
|
||||
|
Loading…
x
Reference in New Issue
Block a user