From 06bc61102add8d307cb53cc7798044d8477f010d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 19 Oct 2014 22:02:11 +0100 Subject: Give an error in dcpomatic_cli if a content file is not found. --- src/tools/dcpomatic_cli.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/tools') 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 (); -- cgit v1.2.3