]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_restore.c
- Move test for MaxStartDelay as suggested by Peter.
[bacula/bacula] / bacula / src / dird / ua_restore.c
index 59947a36d52d5b60a40602ee46d7dcf9b5870b26..25438c3e1a00db20ba3092512cd78e7a9199fde5 100644 (file)
@@ -66,7 +66,7 @@ struct RESTORE_CTX {
    uint32_t TotalFiles;
    uint32_t JobId;
    char ClientName[MAX_NAME_LENGTH];
-   char last_jobid[10];
+   char last_jobid[20];
    POOLMEM *JobIds;                   /* User entered string of JobIds */
    STORE  *store;
    JOB *restore_job;
@@ -448,13 +448,16 @@ static int user_select_jobids_or_files(UAContext *ua, RESTORE_CTX *rx)
          done = false;
          break;
       case 1:                         /* list where a file is saved */
+         if (!get_client_name(ua, rx)) {
+            return 0;
+         }
          if (!get_cmd(ua, _("Enter Filename (no path):"))) {
             return 0;
          }
          len = strlen(ua->cmd);
          fname = (char *)malloc(len * 2 + 1);
          db_escape_string(fname, ua->cmd, len);
-         Mmsg(rx->query, uar_file, fname);
+         Mmsg(rx->query, uar_file, rx->ClientName, fname);
          free(fname);
          gui_save = ua->jcr->gui;
          ua->jcr->gui = true;
@@ -895,8 +898,8 @@ static bool build_directory_tree(UAContext *ua, RESTORE_CTX *rx)
    }
    if (tree.FileCount == 0) {
       bsendmsg(ua, "\nThere were no files inserted into the tree, so file selection\n"
-         "is not possible.\nMost likely your retention policy pruned the files\n");
-      if (!get_yesno(ua, _("Do you want to restore all the files? (yes|no): "))) {
+         "is not possible.Most likely your retention policy pruned the files\n");
+      if (!get_yesno(ua, _("\nDo you want to restore all the files? (yes|no): "))) {
          OK = false;
       } else {
          last_JobId = 0;