From 7bc349aa8da5a046a9e1b0c08e3fc657c380386b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 22 Mar 2018 23:32:20 +0000 Subject: [PATCH] Don't crash when trying to create a film in a bad location. --- src/tools/dcpomatic.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 1e6c49d7b..2285cccff 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -427,7 +427,11 @@ private: int const r = d->ShowModal (); if (r == wxID_OK && d->check_path() && maybe_save_then_delete_film()) { - new_film (d->path(), d->template_name()); + try { + new_film (d->path(), d->template_name()); + } catch (boost::filesystem::filesystem_error& e) { + error_dialog (this, _("Could not create folder to store film"), std_to_wx(e.what())); + } } d->Destroy (); -- 2.30.2