2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:07:42 +00:00

ProjectPath bug fixes

This commit is contained in:
Jack Andersen
2017-12-01 19:49:45 -10:00
parent c9f7d67318
commit d4ce1d4913
4 changed files with 19 additions and 9 deletions

View File

@@ -170,7 +170,8 @@ Time ProjectPath::getModtime() const
}
else if (S_ISDIR(theStat.st_mode))
{
hecl::DirectoryEnumerator de(m_absPath);
hecl::DirectoryEnumerator de(m_absPath, hecl::DirectoryEnumerator::Mode::DirsThenFilesSorted,
false, false, true);
for (const hecl::DirectoryEnumerator::Entry& ent : de)
{
if (!hecl::Stat(ent.m_path.c_str(), &theStat))
@@ -218,7 +219,8 @@ static void _recursiveGlob(Database::Project& proj,
/* Compile component into regex */
SystemRegex regComp(comp, SystemRegex::ECMAScript);
hecl::DirectoryEnumerator de(itStr);
hecl::DirectoryEnumerator de(itStr, hecl::DirectoryEnumerator::Mode::DirsThenFilesSorted,
false, false, true);
for (const hecl::DirectoryEnumerator::Entry& ent : de)
{
if (std::regex_match(ent.m_name, regComp))
@@ -242,14 +244,16 @@ static void _recursiveGlob(Database::Project& proj,
void ProjectPath::getDirChildren(std::map<SystemString, ProjectPath>& outPaths) const
{
hecl::DirectoryEnumerator de(m_absPath);
hecl::DirectoryEnumerator de(m_absPath, hecl::DirectoryEnumerator::Mode::DirsThenFilesSorted,
false, false, true);
for (const hecl::DirectoryEnumerator::Entry& ent : de)
outPaths[ent.m_name] = ProjectPath(*this, ent.m_name);
}
hecl::DirectoryEnumerator ProjectPath::enumerateDir() const
{
return hecl::DirectoryEnumerator(m_absPath);
return hecl::DirectoryEnumerator(m_absPath, hecl::DirectoryEnumerator::Mode::DirsThenFilesSorted,
false, false, true);
}
void ProjectPath::getGlobResults(std::vector<ProjectPath>& outPaths) const