swaroop: force playlists to be saved as .xml.
authorCarl Hetherington <cth@carlh.net>
Tue, 18 Dec 2018 22:27:21 +0000 (22:27 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 18 Dec 2018 22:27:21 +0000 (22:27 +0000)
src/tools/dcpomatic_playlist.cc

index 0b8f935b3aaf0d8dc02ba1b3e7dcd0599b092e10..50f692376d0cace72ead47bb8cde2f78a97f28ed 100644 (file)
@@ -283,7 +283,9 @@ private:
                wxString default_dir = c->player_playlist_directory() ? std_to_wx(c->player_playlist_directory()->string()) : wxString(wxEmptyString);
                wxFileDialog* d = new wxFileDialog (this, _("Select playlist file"), default_dir, wxEmptyString, wxT("XML files (*.xml)|*.xml"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
                if (d->ShowModal() == wxID_OK) {
-                       _playlist.write (wx_to_std(d->GetPath()));
+                       boost::filesystem::path file = wx_to_std (d->GetPath());
+                       file.replace_extension (".xml");
+                       _playlist.write (file);
                }
        }