diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-10-19 22:02:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-10-19 22:02:11 +0100 |
| commit | 06bc61102add8d307cb53cc7798044d8477f010d (patch) | |
| tree | bb8941edcb133dc27e9297ab5400ce956e3c9fb8 /src/tools/dcpomatic_cli.cc | |
| parent | 45af2ebbfc3f38a7acc0bb17b7fb44ce0904bb88 (diff) | |
Give an error in dcpomatic_cli if a content file is not found.
Diffstat (limited to 'src/tools/dcpomatic_cli.cc')
| -rw-r--r-- | src/tools/dcpomatic_cli.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/dcpomatic_cli.cc b/src/tools/dcpomatic_cli.cc index 5cb05e11d..23ca938d4 100644 --- a/src/tools/dcpomatic_cli.cc +++ b/src/tools/dcpomatic_cli.cc @@ -139,6 +139,17 @@ main (int argc, char* argv[]) exit (EXIT_FAILURE); } + ContentList content = film->content (); + for (ContentList::const_iterator i = content.begin(); i != content.end(); ++i) { + vector<boost::filesystem::path> paths = (*i)->paths (); + for (vector<boost::filesystem::path>::const_iterator j = paths.begin(); j != paths.end(); ++j) { + if (!boost::filesystem::exists (*j)) { + cerr << argv[0] << ": content file " << *j << " not found.\n"; + exit (EXIT_FAILURE); + } + } + } + cout << "\nMaking DCP for " << film->name() << "\n"; film->make_dcp (); |
