mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 20:22:30 +01:00
VFS: fixup handling . and .. after #9528
This commit is contained in:
parent
673e84920b
commit
6ae1f1b02c
@ -291,12 +291,10 @@ std::string vfs::escape(std::string_view name, bool escape_slash)
|
||||
{
|
||||
std::string result;
|
||||
|
||||
if (name.size() > 2 && name.find_first_not_of('.') == umax)
|
||||
if (name.size() <= 2 && name.find_first_not_of('.') == umax)
|
||||
{
|
||||
// Name contains only dots, not allowed on Windows.
|
||||
result.reserve(name.size() + 2);
|
||||
result += reinterpret_cast<const char*>(u8".");
|
||||
result += name.substr(1);
|
||||
// Return . or .. as is
|
||||
result = name;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user