mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
Escape problematic characters in VFS
With full-width <>:"\|?*
This commit is contained in:
parent
19f3bb8cb0
commit
5b19908996
5 changed files with 253 additions and 15 deletions
|
|
@ -103,13 +103,15 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version,
|
|||
const auto prefix_list = fmt::split(setList->dirNamePrefix.get_ptr(), { "|" });
|
||||
|
||||
// get the saves matching the supplied prefix
|
||||
for (const auto& entry : fs::dir(base_dir))
|
||||
for (auto&& entry : fs::dir(base_dir))
|
||||
{
|
||||
if (!entry.is_directory)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
entry.name = vfs::unescape(entry.name);
|
||||
|
||||
for (const auto& prefix : prefix_list)
|
||||
{
|
||||
if (entry.name.substr(0, prefix.size()) == prefix)
|
||||
|
|
@ -453,8 +455,10 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version,
|
|||
|
||||
auto file_list = statGet->fileList.get_ptr();
|
||||
|
||||
for (const auto& entry : fs::dir(dir_path))
|
||||
for (auto&& entry : fs::dir(dir_path))
|
||||
{
|
||||
entry.name = vfs::unescape(entry.name);
|
||||
|
||||
// only files, system files ignored, fileNum is limited by setBuf->fileListMax
|
||||
if (!entry.is_directory && entry.name != "PARAM.SFO" && statGet->fileListNum++ < setBuf->fileListMax)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue