From 4ff581b9501ddb2d422dd5d7fceb1a66c722bdca Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 20 Jan 2010 20:58:59 +0100 Subject: [PATCH] Stop backup sooner after cancel --- bacula/src/findlib/find.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; + } } } } -- 2.39.5