From: Eric Bollengier Date: Tue, 4 Apr 2023 06:35:26 +0000 (+0200) Subject: Fix #10030 About small issue while canceling the restore command X-Git-Tag: Release-13.0.3~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b5dded462d795c653494dc962d9f1c02113778f;p=thirdparty%2Fbacula.git Fix #10030 About small issue while canceling the restore command --- diff --git a/bacula/src/dird/ua_restore.c b/bacula/src/dird/ua_restore.c index 7c8d5e997..4c8b03aab 100644 --- a/bacula/src/dird/ua_restore.c +++ b/bacula/src/dird/ua_restore.c @@ -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);