uint32_t selected_files;
char *where;
RBSR *bsr;
- POOLMEM *fname;
- POOLMEM *path;
+ POOLMEM *fname; /* filename only */
+ POOLMEM *path; /* path only */
POOLMEM *query;
- int fnl;
- int pnl;
+ int fnl; /* filename length */
+ int pnl; /* path length */
bool found;
+ bool all; /* mark all as default */
NAME_LIST name_list;
};
bsendmsg(ua, _("Unable to construct a valid BSR. Cannot continue.\n"));
goto bail_out;
}
- write_bsr_file(ua, rx.bsr);
+ if (!write_bsr_file(ua, rx.bsr)) {
+ goto bail_out;
+ }
bsendmsg(ua, _("\n%u file%s selected to be restored.\n\n"), rx.selected_files,
rx.selected_files==1?"":"s");
} else {
"file", /* 3 */
"select", /* 4 */
"pool", /* 5 */
- "client", /* 6 */
- "storage", /* 7 */
- "where", /* 8 */
- "all", /* 9 */
- "yes", /* 10 */
+ "all", /* 6 */
+ "client", /* 7 */
+ "storage", /* 8 */
+ "fileset", /* 9 */
+ "where", /* 10 */
+ "yes", /* 11 */
+ "done", /* 12 */
NULL
};
return 0;
}
break;
+ case 6: /* all specified */
+ rx->all = true;
+ break;
/*
- * All keywords 6 or greater are ignored or handled by a select prompt
+ * All keywords 7 or greater are ignored or handled by a select prompt
*/
default:
break;
tree.root = new_tree(rx->TotalFiles);
tree.root->fname = nofname;
tree.ua = ua;
+ tree.all = rx->all;
last_JobId = 0;
/*
* For display purposes, the same JobId, with different volumes may
bsendmsg(ua, "%s", db_strerror(ua->db));
}
}
- bsendmsg(ua, "%d Job%s inserted into the tree and marked for extraction.\n",
- items, items==1?"":"s");
+ bsendmsg(ua, "%d Job%s inserted into the tree%s.\n",
+ items, items==1?"":"s", tree.all?" and marked for extraction":"");
/* Check MediaType and select storage that corresponds */
get_storage_from_mediatype(ua, &rx->name_list, rx);
- if (find_arg(ua, _("all")) < 0) {
+ if (find_arg(ua, _("done")) < 0) {
/* Let the user interact in selecting which files to restore */
OK = user_select_files_from_tree(&tree);
}