Fix addition of image sequence directories with dcpomatic2_create.
authorCarl Hetherington <cth@carlh.net>
Fri, 7 Jul 2017 15:06:15 +0000 (16:06 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 7 Jul 2017 15:06:15 +0000 (16:06 +0100)
src/tools/dcpomatic_create.cc

index 7c3ee1308dd02ae6e9a339dd64517978ff55b1a3..6cf4a9c643f5a7b35ee346a48440c4151367b9cb 100644 (file)
@@ -238,12 +238,10 @@ main (int argc, char* argv[])
                for (int i = optind; i < argc; ++i) {
                        boost::filesystem::path const can = boost::filesystem::canonical (argv[i]);
                        list<shared_ptr<Content> > content;
-                       try {
+
+                       if (boost::filesystem::exists (can / "ASSETMAP") || (boost::filesystem::exists (can / "ASSETMAP.xml"))) {
                                content.push_back (shared_ptr<DCPContent> (new DCPContent (film, can)));
-                       } catch (dcp::DCPReadError) {
-                               /* I guess it's not a DCP */
-                               content = content_factory (film, can);
-                       } catch (boost::filesystem::filesystem_error) {
+                       } else {
                                /* I guess it's not a DCP */
                                content = content_factory (film, can);
                        }