]> git.sur5r.net Git - bacula/bacula/commitdiff
fix #3269 obey the user choice of "Are you sure you want to delete X JobIds
authorAlain Spineux <alain@baculasystems.com>
Mon, 6 Nov 2017 13:19:05 +0000 (14:19 +0100)
committerKern Sibbald <kern@sibbald.com>
Mon, 20 Nov 2017 07:03:59 +0000 (08:03 +0100)
- "no" was ignored and all selected jobs where deleted
- has been tested

bacula/src/dird/ua_cmds.c

index 4ff054295048c93b58f2bc0cfb8dcccba94c2e2b..c496a60721f3245bd9164db68b25e80a955a1aaf 100644 (file)
@@ -1615,7 +1615,7 @@ static void delete_job(UAContext *ua)
       if (sl.size() > 25 && (find_arg(ua, "yes") < 0)) {
          bsnprintf(buf, sizeof(buf),
                    _("Are you sure you want to delete %d JobIds ? (yes/no): "), sl.size());
-         if (!get_yesno(ua, buf)) {
+         if (!get_yesno(ua, buf) || ua->pint32_val==0) {
             return;
          }
       }