mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-22 09:09:18 +01:00
Add check for "." in FSC path (#402)
This commit is contained in:
parent
ffa213c794
commit
1bcc064593
@ -28,6 +28,8 @@ class FSCPath
|
||||
{
|
||||
if (m_names.size() > 0xFFFF)
|
||||
return;
|
||||
if (nameLen == 1 && *name == '.')
|
||||
return;
|
||||
m_nodes.emplace_back((uint16)m_names.size(), nameLen);
|
||||
m_names.insert(m_names.end(), name, name + nameLen);
|
||||
}
|
||||
@ -297,6 +299,12 @@ static void FSTPathUnitTest()
|
||||
cemu_assert_debug(p6.GetNodeCount() == 0);
|
||||
p6 = FSCPath("/////////////");
|
||||
cemu_assert_debug(p6.GetNodeCount() == 0);
|
||||
// test 7 - periods in path
|
||||
FSCPath p7("/vol/content/./..");
|
||||
cemu_assert_debug(p7.GetNodeCount() == 3);
|
||||
cemu_assert_debug(p7.MatchNodeName(0, "vol"));
|
||||
cemu_assert_debug(p7.MatchNodeName(1, "content"));
|
||||
cemu_assert_debug(p7.MatchNodeName(2, ".."));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user