From: Carl Hetherington Date: Sun, 19 Oct 2014 21:02:11 +0000 (+0100) Subject: Give an error in dcpomatic_cli if a content file is not found. X-Git-Tag: v2.0.48~551^2~3 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=06bc61102add8d307cb53cc7798044d8477f010d Give an error in dcpomatic_cli if a content file is not found. --- 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 paths = (*i)->paths (); + for (vector::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 ();