Revert overwrite changes; remove our replacement of file extension (#1383).
[dcpomatic.git] / src / wx / full_config_dialog.cc
index 8c822e1736d77d27e873fb5fb4c4d32f5b358955..96a4c86e9b00d164578a799a8290704f808bc1db 100644 (file)
@@ -191,14 +191,12 @@ private:
        void export_cinemas_file ()
        {
                wxFileDialog* d = new wxFileDialog (
-                       _panel, _("Select Cinemas File"), wxEmptyString, wxEmptyString, wxT ("XML files (*.xml)|*.xml"), wxFD_SAVE
+                       _panel, _("Select Cinemas File"), wxEmptyString, wxEmptyString, wxT ("XML files (*.xml)|*.xml"),
+                       wxFD_SAVE | wxFD_OVERWRITE_PROMPT
                 );
 
                if (d->ShowModal () == wxID_OK) {
-                       optional<boost::filesystem::path> path = path_from_file_dialog (d, "xml");
-                       if (path) {
-                               boost::filesystem::copy_file (Config::instance()->cinemas_file(), *path);
-                       }
+                       boost::filesystem::copy_file (Config::instance()->cinemas_file(), wx_to_std(d->GetPath()));
                }
                d->Destroy ();
        }