X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Ffilm.cc;h=f7fd96a01a35e4f405bb0f575ec9cb161092de03;hp=39dfaf5c0b073b66e4df131a3e4981f30f9d6395;hb=b69813dd682c8a0c3b7c46287b1a75c7c10f6a10;hpb=122bea7f0e08e07dcdaccd51751a9c83504f4c04 diff --git a/src/lib/film.cc b/src/lib/film.cc index 39dfaf5c0..f7fd96a01 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -180,7 +180,8 @@ Film::Film (optional dir) boost::filesystem::path result; for (boost::filesystem::path::iterator i = p.begin(); i != p.end(); ++i) { if (*i == "..") { - if (boost::filesystem::is_symlink (result) || result.filename() == "..") { + boost::system::error_code ec; + if (boost::filesystem::is_symlink(result, ec) || result.filename() == "..") { result /= *i; } else { result = result.parent_path (); @@ -319,6 +320,10 @@ Film::make_dcp (bool gui, bool check) throw runtime_error (_("You must add some content to the DCP before creating it")); } + if (length() == DCPTime()) { + throw runtime_error (_("The DCP is empty, perhaps because all the content has zero length.")); + } + if (dcp_content_type() == 0) { throw MissingSettingError (_("content type")); }