diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-11-30 22:34:19 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-11-30 22:34:19 +0100 |
| commit | d9e6b138e84e7a8504075b8581cca4d0fabfbc40 (patch) | |
| tree | c86ea8f3d4a92c424c4e946be5524ea5e28d2cac /src/tools | |
| parent | 2ed188232e575e42d13cbc3aaab3b055c7ff26af (diff) | |
Try to improve the checking for overwrite of export files a little
on Linux; I think we need to do it ourselves rather than relying
on wxFileDialog.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index ae80a42da..4ddedab41 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -913,6 +913,18 @@ private: { ExportDialog* d = new ExportDialog (this, _film->isdcf_name(true)); if (d->ShowModal() == wxID_OK) { + if (boost::filesystem::exists(d->path())) { + bool ok = confirm_dialog( + this, + wxString::Format (_("File %s already exists. Do you want to overwrite it?"), std_to_wx(d->path().string()).data()) + ); + + if (!ok) { + d->Destroy (); + return; + } + } + shared_ptr<TranscodeJob> job (new TranscodeJob (_film)); if (d->format() == EXPORT_FORMAT_SUBTITLES_DCP) { job->set_encoder ( |
