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;
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;
}
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;