mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-31 10:36:30 +03:00
ecode: ProjectDirectoryTree and IgnoreMatcher fixes and improvements.
This commit is contained in:
@@ -161,7 +161,7 @@ void ProjectDirectoryTree::getDirectoryFiles( std::vector<std::string>& files,
|
||||
std::string directory,
|
||||
std::set<std::string> currentDirs,
|
||||
const bool& ignoreHidden,
|
||||
const IgnoreMatcherManager& ignoreMatcher ) {
|
||||
IgnoreMatcherManager& ignoreMatcher ) {
|
||||
if ( !mRunning )
|
||||
return;
|
||||
currentDirs.insert( directory );
|
||||
@@ -190,8 +190,16 @@ void ProjectDirectoryTree::getDirectoryFiles( std::vector<std::string>& files,
|
||||
mDirectories.push_back( fullpath );
|
||||
}
|
||||
IgnoreMatcherManager dirMatcher( fullpath );
|
||||
getDirectoryFiles( files, names, fullpath, currentDirs, ignoreHidden,
|
||||
dirMatcher.foundMatch() ? dirMatcher : ignoreMatcher );
|
||||
IgnoreMatcher* childMatch = nullptr;
|
||||
if ( dirMatcher.foundMatch() ) {
|
||||
childMatch = dirMatcher.popMatcher( 0 );
|
||||
ignoreMatcher.addChild( childMatch );
|
||||
}
|
||||
getDirectoryFiles( files, names, fullpath, currentDirs, ignoreHidden, ignoreMatcher );
|
||||
if ( childMatch ) {
|
||||
ignoreMatcher.removeChild( childMatch );
|
||||
eeSAFE_DELETE( childMatch );
|
||||
}
|
||||
} else {
|
||||
files.emplace_back( fullpath );
|
||||
names.emplace_back( file );
|
||||
|
||||
Reference in New Issue
Block a user