projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2645834
)
Better error message when loading a DCP with no ASSETMAP{,.xml}
author
Carl Hetherington
<cth@carlh.net>
Thu, 15 Nov 2018 11:43:18 +0000
(11:43 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 15 Nov 2018 11:43:18 +0000
(11:43 +0000)
src/lib/dcp_content.cc
patch
|
blob
|
history
diff --git
a/src/lib/dcp_content.cc
b/src/lib/dcp_content.cc
index c73d0df8610371ab637e8affa59a9a29b4cbfc1f..cc636b0bfb0d5bd40965935aa31296ad114cdcc7 100644
(file)
--- 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