mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-11 18:50:55 +00:00
VFS: fixup handling . and .. after #9528
This commit is contained in:
parent
673e84920b
commit
6ae1f1b02c
1 changed files with 3 additions and 5 deletions
|
@ -291,12 +291,10 @@ std::string vfs::escape(std::string_view name, bool escape_slash)
|
||||||
{
|
{
|
||||||
std::string result;
|
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.
|
// Return . or .. as is
|
||||||
result.reserve(name.size() + 2);
|
result = name;
|
||||||
result += reinterpret_cast<const char*>(u8".");
|
|
||||||
result += name.substr(1);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue