summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-06-05 00:01:03 +0200
committerCarl Hetherington <cth@carlh.net>2021-06-05 00:01:03 +0200
commit3c5a2f73afa9a3a5324b0345ffa9642ee474598d (patch)
tree0a9c8dc330c237dc33fe63e08d043edbe6725f62
parent9f4cb3b340376d93be39dc97c2e0c631e9cf73c4 (diff)
Give an error if a non-DCP folder is selected for DCP writing (#2024).
-rw-r--r--src/tools/dcpomatic_disk.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/dcpomatic_disk.cc b/src/tools/dcpomatic_disk.cc
index f495ecc41..7e43c0684 100644
--- a/src/tools/dcpomatic_disk.cc
+++ b/src/tools/dcpomatic_disk.cc
@@ -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()));
}