Use the correct prompt for file/folder.
[dcpomatic.git] / src / tools / dcpomatic_kdm.cc
index f0406c1d0eecaaa346ba04184f60d27f23fa038e..0d79d67a88245c02f75420bc0e485b5ad2b0e3f5 100644 (file)
@@ -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 */