Skip to content

Commit

Permalink
Added '.skyscraperignoretree' check
Browse files Browse the repository at this point in the history
  • Loading branch information
muldjord committed Jan 19, 2022
1 parent e07faa2 commit b8bd49c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/skyscraper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,19 @@ void Skyscraper::run()
QDirIterator dirIt(config.inputFolder,
QDir::Dirs | QDir::NoDotAndDotDot,
QDirIterator::Subdirectories);
QString exclude = "";
while(dirIt.hasNext()) {
QString subdir = dirIt.next();
if(QFileInfo::exists(subdir + "/.skyscraperignoretree")) {
exclude = subdir;
}
if(!exclude.isEmpty() &&
(subdir == exclude ||
(subdir.left(exclude.length()) == exclude && subdir.mid(exclude.length(), 1) == "/"))) {
continue;
} else {
exclude.clear();
}
if(QFileInfo::exists(subdir + "/.skyscraperignore")) {
continue;
}
Expand Down

0 comments on commit b8bd49c

Please sign in to comment.