From ada78c153ca05c2bd3cefcd4b3497af7dde7ec95 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 30 May 2023 20:31:53 +0200 Subject: Don't show warning when only removing an empty DKDM folder (#2541). --- src/tools/dcpomatic_kdm.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/tools') diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index 350494378..6628c2b3f 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -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)); -- cgit v1.2.3