Add pre-running warning to disk writer.
[dcpomatic.git] / src / tools / dcpomatic_disk.cc
index bf4d45e2040461b6770fb8c54139ee4021240da2..1d8fac83a1c78834af27c94243bf93f69726183f 100644 (file)
@@ -24,6 +24,7 @@
 #include "wx/drive_wipe_warning_dialog.h"
 #include "wx/try_unmount_dialog.h"
 #include "wx/message_dialog.h"
+#include "wx/disk_warning_dialog.h"
 #include "lib/file_log.h"
 #include "lib/dcpomatic_log.h"
 #include "lib/util.h"
@@ -300,6 +301,12 @@ public:
                        */
                        Config::drop ();
 
+                       DiskWarningDialog* warning = new DiskWarningDialog ();
+                       warning->ShowModal ();
+                       if (!warning->confirmed()) {
+                               return false;
+                       }
+
                        _frame = new DOMFrame (_("DCP-o-matic Disk Writer"));
                        SetTopWindow (_frame);
 
@@ -311,6 +318,7 @@ public:
                catch (exception& e)
                {
                        error_dialog (0, wxString::Format ("DCP-o-matic could not start."), std_to_wx(e.what()));
+                       return false;
                }
 
                return true;