summaryrefslogtreecommitdiff
path: root/ftparchive/writer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ftparchive/writer.cc')
-rw-r--r--ftparchive/writer.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
index dbc097af6..078638c41 100644
--- a/ftparchive/writer.cc
+++ b/ftparchive/writer.cc
@@ -216,9 +216,8 @@ bool FTWScanner::RecursiveScan(string const &Dir)
std::sort(FilesToProcess.begin(), FilesToProcess.end(), [](PairType a, PairType b) {
return a.first < b.first;
});
- for (PairType it : FilesToProcess)
- if (ProcessFile(it.first.c_str(), it.second) != 0)
- return false;
+ if (not std::all_of(FilesToProcess.cbegin(), FilesToProcess.cend(), [](auto &&it) { return ProcessFile(it.first.c_str(), it.second) == 0; }))
+ return false;
FilesToProcess.clear();
return true;
}