]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #10030 About small issue while canceling the restore command
authorEric Bollengier <eric@baculasystems.com>
Tue, 4 Apr 2023 06:35:26 +0000 (08:35 +0200)
committerEric Bollengier <eric@baculasystems.com>
Tue, 2 May 2023 07:07:18 +0000 (09:07 +0200)
bacula/src/dird/ua_restore.c

index 7c8d5e997bf6d61fba826a0d7c0ca3b96a74ed7f..4c8b03aab2e7877dde0a40b41e8a74b6240966ba 100644 (file)
@@ -972,10 +972,6 @@ static int user_select_jobids_or_files(UAContext *ua, RESTORE_CTX *rx)
                rx->JobIds);
 
          } else if (get_cmd(ua, _("Enter JobId(s), comma separated, to restore: "))) {
-            if (*ua->cmd == '.') {
-               *rx->JobIds = 0;
-               return 0;                 /* nothing entered, return */
-            }
             db_get_jobids(ua->jcr, ua->db, ua->cmd, &rx->JobIds, false /* clear */);
             if (*rx->JobIds == 0) {
                ua->error_msg(_("No JobId selected\n"));
@@ -983,6 +979,9 @@ static int user_select_jobids_or_files(UAContext *ua, RESTORE_CTX *rx)
             }
             ua->send_msg(_("You have selected the following JobIds: %s\n"),
                          rx->JobIds);
+         } else {
+            *rx->JobIds = 0;
+            return 0;
          }
          if (!have_date) {
             bstrutime(date, sizeof(date), now);