From: Carl Hetherington Date: Thu, 4 Jun 2020 19:39:10 +0000 (+0200) Subject: Only add ExamineContentJobs after a failed CheckContentChangeJob X-Git-Tag: v2.15.78~25 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=ebce2111f20e6b9cbd00ce8ec7e72c68cf176c29;p=dcpomatic.git Only add ExamineContentJobs after a failed CheckContentChangeJob if we are in the GUI. In the CLI client we will give up if the CheckContentChangeJob fails, and immediately destroy the job manager which doesn't end well if we have jobs running at the time. --- diff --git a/src/lib/check_content_change_job.cc b/src/lib/check_content_change_job.cc index 1df3bc9cd..644e730bb 100644 --- a/src/lib/check_content_change_job.cc +++ b/src/lib/check_content_change_job.cc @@ -82,12 +82,11 @@ CheckContentChangeJob::run () } } - BOOST_FOREACH (shared_ptr i, changed) { - JobManager::instance()->add(shared_ptr(new ExamineContentJob(_film, i))); - } - if (!changed.empty()) { if (_gui) { + BOOST_FOREACH (shared_ptr i, changed) { + JobManager::instance()->add(shared_ptr(new ExamineContentJob(_film, i))); + } string m = _("Some files have been changed since they were added to the project.\n\nThese files will now be re-examined, so you may need to check their settings."); if (_following) { /* I'm assuming that _following is a make DCP job */