Fix FileScanner not taking notice of recurse flag

This commit is contained in:
Ted John 2018-01-06 18:49:56 +00:00 committed by Michael Steenbeek
parent 4eb2ceac47
commit d8b3fb01a7
1 changed files with 7 additions and 4 deletions

View File

@ -146,11 +146,14 @@ public:
const DirectoryChild * child = &state->Listing[state->Index];
if (child->Type == DIRECTORY_CHILD_TYPE::DC_DIRECTORY)
{
utf8 childPath[MAX_PATH];
String::Set(childPath, sizeof(childPath), state->Path.c_str());
Path::Append(childPath, sizeof(childPath), child->Name.c_str());
if (_recurse)
{
utf8 childPath[MAX_PATH];
String::Set(childPath, sizeof(childPath), state->Path.c_str());
Path::Append(childPath, sizeof(childPath), child->Name.c_str());
PushState(childPath);
PushState(childPath);
}
}
else if (PatternMatch(child->Name))
{