Give an error if a non-DCP folder is selected for DCP writing (#2024).
authorCarl Hetherington <cth@carlh.net>
Fri, 4 Jun 2021 22:01:03 +0000 (00:01 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 4 Jun 2021 22:01:03 +0000 (00:01 +0200)
src/tools/dcpomatic_disk.cc

index f495ecc..7e43c06 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()));
        }