diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-06-05 00:04:07 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-06-17 23:58:11 +0200 |
| commit | 7d33e1baa1cb6dd88b834c7831d419d91c194b43 (patch) | |
| tree | eba248eb74e55f7948b6ad111035e168350eb3c5 | |
| parent | 19823038e1a676dbcc38692fa20a4aa904230a08 (diff) | |
Add some debug logging to missing file finding.
| -rw-r--r-- | src/lib/find_missing.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/find_missing.cc b/src/lib/find_missing.cc index 2234637b3..edf649f5b 100644 --- a/src/lib/find_missing.cc +++ b/src/lib/find_missing.cc @@ -20,6 +20,7 @@ #include "content.h" +#include "dcpomatic_log.h" #include "find_missing.h" #include "util.h" #include <boost/filesystem.hpp> @@ -39,6 +40,7 @@ search (Replacements& replacement_paths, boost::filesystem::path directory, int { boost::system::error_code ec; for (auto candidate: boost::filesystem::directory_iterator(directory, ec)) { + LOG_GENERAL("Have candidate %1", candidate.path().string()); if (boost::filesystem::is_regular_file(candidate.path())) { for (auto& replacement: replacement_paths) { for (auto& path: replacement.second) { @@ -49,6 +51,8 @@ search (Replacements& replacement_paths, boost::filesystem::path directory, int } } else if (boost::filesystem::is_directory(candidate.path()) && depth <= 2) { search (replacement_paths, candidate, depth + 1); + } else { + LOG_GENERAL("Candidate was ignored; depth=%1", candidate.path().string()); } } @@ -63,6 +67,14 @@ dcpomatic::find_missing (vector<shared_ptr<Content>> content_to_fix, boost::file { using namespace boost::filesystem; + LOG_GENERAL_NC("Find missing to fix:"); + for (auto content: content_to_fix) { + for (auto file: content->paths()) { + LOG_GENERAL(" %1", file.string()); + } + } + LOG_GENERAL("Clue is %1", clue); + Replacements replacement_paths; for (auto content: content_to_fix) { replacement_paths[content] = content->paths(); |
