Only add ExamineContentJobs after a failed CheckContentChangeJob
authorCarl Hetherington <cth@carlh.net>
Thu, 4 Jun 2020 19:39:10 +0000 (21:39 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 4 Jun 2020 19:39:10 +0000 (21:39 +0200)
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

index 1df3bc9cda1f945a15e87c41091214a3a1dc14fa..644e730bbacf7025fe050e4f30fc9b67d80793e5 100644 (file)
@@ -82,12 +82,11 @@ CheckContentChangeJob::run ()
                }
        }
 
-       BOOST_FOREACH (shared_ptr<Content> i, changed) {
-               JobManager::instance()->add(shared_ptr<Job>(new ExamineContentJob(_film, i)));
-       }
-
        if (!changed.empty()) {
                if (_gui) {
+                       BOOST_FOREACH (shared_ptr<Content> i, changed) {
+                               JobManager::instance()->add(shared_ptr<Job>(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 */