Give an error if a non-DCP folder is selected for DCP writing (#2024).
[dcpomatic.git] / src / tools / dcpomatic_disk.cc
index f495ecc4188b8bb9b2aef37548da8ace017ed38a..7e43c068469ae74149671ca1124971e9d7f46727 100644 (file)
@@ -182,6 +182,11 @@ public:
 
        void set_dcp (boost::filesystem::path dcp)
        {
+               if (!boost::filesystem::exists(dcp / "ASSETMAP") && !boost::filesystem::exists(dcp / "ASSETMAP.xml")) {
+                       error_dialog (nullptr, _("No ASSETMAP or ASSETMAP.xml found in this folder.  Please choose a DCP folder."));
+                       return;
+               }
+
                _dcp_path = dcp;
                _dcp_name->SetLabel (std_to_wx(dcp.filename().string()));
        }