From ebce2111f20e6b9cbd00ce8ec7e72c68cf176c29 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 4 Jun 2020 21:39:10 +0200 Subject: [PATCH] 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. --- src/lib/check_content_change_job.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 */ -- 2.30.2