diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-10-17 19:23:18 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-10-17 19:23:18 +0100 |
| commit | ce9bb37168f52a8d1348e1334fc15d5778fffa75 (patch) | |
| tree | e77c65084e72290f77d5346e4020d3357403c018 /src/wx/full_config_dialog.cc | |
| parent | 4eaecb1841d3a80a4f06613ad4c0bd44d89285a9 (diff) | |
Prevent un-prompted overwrite of files when exporting things from config (#1383).
Diffstat (limited to 'src/wx/full_config_dialog.cc')
| -rw-r--r-- | src/wx/full_config_dialog.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index bb4f43bea..974635a8b 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -196,7 +196,10 @@ private: ); if (d->ShowModal () == wxID_OK) { - boost::filesystem::copy_file (Config::instance()->cinemas_file(), path_from_file_dialog (d, "xml")); + optional<boost::filesystem::path> path = path_from_file_dialog (d, "xml"); + if (path) { + boost::filesystem::copy_file (Config::instance()->cinemas_file(), *path); + } } d->Destroy (); } |
