From 6ca8f63ff524330bf58877ffe963466495e46758 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 28 Jan 2023 10:18:18 +0100 Subject: [PATCH] Use the correct prompt for file/folder. --- src/tools/dcpomatic_kdm.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index f0406c1d0..0d79d67a8 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -312,10 +312,17 @@ private: bool confirm_overwrite (boost::filesystem::path path) { - return confirm_dialog ( - this, - wxString::Format (_("File %s already exists. Do you want to overwrite it?"), std_to_wx(path.string()).data()) - ); + if (boost::filesystem::is_directory(path)) { + return confirm_dialog ( + this, + wxString::Format(_("Folder %s already exists. Do you want to overwrite it?"), std_to_wx(path.string()).data()) + ); + } else { + return confirm_dialog ( + this, + wxString::Format(_("File %s already exists. Do you want to overwrite it?"), std_to_wx(path.string()).data()) + ); + } } /** @id if not nullptr this is filled in with the wxTreeItemId of the selection */ -- 2.30.2