From: Kern Sibbald Date: Wed, 20 Jan 2010 19:58:59 +0000 (+0100) Subject: Stop backup sooner after cancel X-Git-Tag: Release-7.0.0~2352 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4ff581b9501ddb2d422dd5d7fceb1a66c722bdca;p=bacula%2Fbacula Stop backup sooner after cancel --- diff --git a/bacula/src/findlib/find.c b/bacula/src/findlib/find.c index e6ad616692..3cdd8e0826 100644 --- a/bacula/src/findlib/find.c +++ b/bacula/src/findlib/find.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2009 Free Software Foundation Europe e.V. + Copyright (C) 2000-2010 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -34,7 +34,6 @@ * * Kern E. Sibbald, MM * - * Version $Id$ */ @@ -203,6 +202,9 @@ find_files(JCR *jcr, FF_PKT *ff, int file_save(JCR *jcr, FF_PKT *ff_pkt, bool to if (find_one_file(jcr, ff, our_callback, ff->top_fname, (dev_t)-1, true) == 0) { return 0; /* error return */ } + if (job_canceled(jcr)) { + return 0; + } } foreach_dlist(node, &incexe->plugin_list) { char *fname = node->c_str(); @@ -215,6 +217,9 @@ find_files(JCR *jcr, FF_PKT *ff, int file_save(JCR *jcr, FF_PKT *ff_pkt, bool to ff->cmd_plugin = true; plugin_save(jcr, ff, true); ff->cmd_plugin = false; + if (job_canceled(jcr)) { + return 0; + } } } }