Skip to content

Commit

Permalink
Now only adheres to '.skyscraperignore' files when scraping for new data
Browse files Browse the repository at this point in the history
  • Loading branch information
muldjord committed Jan 20, 2022
1 parent 3b0c0f2 commit e619923
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/skyscraper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void Skyscraper::run()
// Create shared queue with files to process
queue = QSharedPointer<Queue>(new Queue());
QList<QFileInfo> infoList = inputDir.entryInfoList();
if(QFileInfo::exists(config.inputFolder + "/.skyscraperignore")) {
if(config.scraper != "cache" && QFileInfo::exists(config.inputFolder + "/.skyscraperignore")) {
infoList.clear();
}
if(!config.startAt.isEmpty() && !infoList.isEmpty()) {
Expand Down Expand Up @@ -277,7 +277,7 @@ void Skyscraper::run()
QString exclude = "";
while(dirIt.hasNext()) {
QString subdir = dirIt.next();
if(QFileInfo::exists(subdir + "/.skyscraperignoretree")) {
if(config.scraper != "cache" && QFileInfo::exists(subdir + "/.skyscraperignoretree")) {
exclude = subdir;
}
if(!exclude.isEmpty() &&
Expand All @@ -287,7 +287,7 @@ void Skyscraper::run()
} else {
exclude.clear();
}
if(QFileInfo::exists(subdir + "/.skyscraperignore")) {
if(config.scraper != "cache" && QFileInfo::exists(subdir + "/.skyscraperignore")) {
continue;
}
inputDir.setPath(subdir);
Expand Down

0 comments on commit e619923

Please sign in to comment.