Don't show warning when only removing an empty DKDM folder (#2541).
[dcpomatic.git] / src / tools / dcpomatic_kdm.cc
index 3504943789408cb3ee85e9dbf6caf276164c5ce2..6628c2b3f6734def9a9908fe6de7e9a0da2254ab 100644 (file)
@@ -732,12 +732,14 @@ private:
                        return;
                }
 
-               if (NagDialog::maybe_nag (
-                           this, Config::NAG_DELETE_DKDM,
-                           _("You are about to remove a DKDM.  This will make it impossible to decrypt the DCP that the DKDM was made for, and it cannot be undone.  "
-                             "Are you sure?"),
-                           true)) {
-                       return;
+               if (removed->contains_dkdm()) {
+                       if (NagDialog::maybe_nag(
+                                   this, Config::NAG_DELETE_DKDM,
+                                   _("You are about to remove a DKDM.  This will make it impossible to decrypt the DCP that the DKDM was made for, and it cannot be undone.  "
+                                     "Are you sure?"),
+                                   true)) {
+                               return;
+                       }
                }
 
                _dkdm->Delete (dkdm_to_id (removed));