diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-11-24 15:00:53 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-11-24 15:00:53 +0000 |
| commit | 979452c78fe2b9aeb6a802d2d900fb83083f9a8a (patch) | |
| tree | 4a8d6de860b5d74c8ce38270e861e903c408af9d /src | |
| parent | 08aed48d141f403a93640cf62d8be70161bd1d30 (diff) | |
Fix tests.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/dcp_content.cc | 26 | ||||
| -rw-r--r-- | src/lib/dcp_content.h | 1 |
2 files changed, 17 insertions, 10 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index ac9f82899..419ffe69c 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -150,16 +150,7 @@ DCPContent::DCPContent (cxml::ConstNodePtr node, int version) void DCPContent::read_directory (boost::filesystem::path p) { - LOG_GENERAL ("DCPContent::read_directory reads %1", p.string()); - for (boost::filesystem::directory_iterator i(p); i != boost::filesystem::directory_iterator(); ++i) { - if (boost::filesystem::is_regular_file (i->path())) { - LOG_GENERAL ("Inside there's regular file %1", i->path().string()); - add_path (i->path()); - } else if (boost::filesystem::is_directory (i->path ())) { - LOG_GENERAL ("Inside there's directory %1", i->path().string()); - read_directory (i->path()); - } - } + read_sub_directory (p); bool have_assetmap = false; BOOST_FOREACH (boost::filesystem::path i, paths()) { @@ -174,6 +165,21 @@ DCPContent::read_directory (boost::filesystem::path p) } void +DCPContent::read_sub_directory (boost::filesystem::path p) +{ + LOG_GENERAL ("DCPContent::read_sub_directory reads %1", p.string()); + for (boost::filesystem::directory_iterator i(p); i != boost::filesystem::directory_iterator(); ++i) { + if (boost::filesystem::is_regular_file (i->path())) { + LOG_GENERAL ("Inside there's regular file %1", i->path().string()); + add_path (i->path()); + } else if (boost::filesystem::is_directory (i->path ())) { + LOG_GENERAL ("Inside there's directory %1", i->path().string()); + read_sub_directory (i->path()); + } + } +} + +void DCPContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job) { bool const needed_assets = needs_assets (); diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index 656c96897..763b3e903 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -152,6 +152,7 @@ private: void add_properties (boost::shared_ptr<const Film> film, std::list<UserProperty>& p) const; void read_directory (boost::filesystem::path); + void read_sub_directory (boost::filesystem::path); std::list<DCPTimePeriod> reels (boost::shared_ptr<const Film> film) const; bool can_reference ( boost::shared_ptr<const Film> film, |
