summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-11-15 11:43:18 +0000
committerCarl Hetherington <cth@carlh.net>2018-11-15 11:43:18 +0000
commitdeb3fc481502a885f26b331c2118a082bdcd4467 (patch)
tree1d939d6e6d6ec72c890a3c7521fb02cc81bde9b8 /src
parent264583479e79b481251f1772b228f82cd77552d3 (diff)
Better error message when loading a DCP with no ASSETMAP{,.xml}
Diffstat (limited to 'src')
-rw-r--r--src/lib/dcp_content.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc
index c73d0df86..cc636b0bf 100644
--- a/src/lib/dcp_content.cc
+++ b/src/lib/dcp_content.cc
@@ -162,6 +162,17 @@ DCPContent::read_directory (boost::filesystem::path p)
read_directory (i->path());
}
}
+
+ bool have_assetmap = false;
+ BOOST_FOREACH (boost::filesystem::path i, paths()) {
+ if (i.filename() == "ASSETMAP" || i.filename() == "ASSETMAP.xml") {
+ have_assetmap = true;
+ }
+ }
+
+ if (!have_assetmap) {
+ throw DCPError ("No ASSETMAP or ASSETMAP.xml file found: is this a DCP?");
+ }
}
void