summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 92de9a1f0..f94c2ac54 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -496,6 +496,16 @@ private:
}
}
+
+ /* Remove any existing DCP if the user agrees */
+ boost::filesystem::path const dcp_dir = _film->dir (_film->dcp_name(), false);
+ if (boost::filesystem::exists (dcp_dir)) {
+ if (!confirm_dialog (this, wxString::Format (_("Do you want to overwrite the existing DCP %s?"), std_to_wx(dcp_dir.string()).data()))) {
+ return;
+ }
+ boost::filesystem::remove_all (dcp_dir);
+ }
+
try {
/* It seems to make sense to auto-save metadata here, since the make DCP may last
a long time, and crashes/power failures are moderately likely.