int cnt; /* count for user feedback */
bool all; /* if set mark all as default */
bool hardlinks_in_mem; /* Set to optimize for speed */
+ bool no_auto_parent; /* Set to not select parent directories */
UAContext *ua;
uint32_t FileEstimate; /* estimate of number of files */
uint32_t FileCount; /* current count of files */
bool all; /* mark all as default */
bool hardlinks_in_mem; /* keep hard links in memory */
bool fdcalled; /* True if we should reuse the FD socket */
+ bool no_auto_parent; /* Select or not parent directories */
NAME_LIST name_list;
POOLMEM *component_fname;
FILE *component_fd;
{ NT_("query"), query_cmd, _("Query catalog"), NT_("[<query-item-number>]"), false},
{ NT_("restore"), restore_cmd, _("Restore files"),
NT_("where=</path> client=<client> storage=<storage> bootstrap=<file> "
- "restorejob=<job> restoreclient=<cli>"
+ "restorejob=<job> restoreclient=<cli> noautoparent"
"\n\tcomment=<text> jobid=<jobid> jobuser=<user> jobgroup=<grp> copies done select all"), false},
{ NT_("relabel"), relabel_cmd, _("Relabel a tape"),
for (i = 0; i < ua->argc ; i++) {
if (strcasecmp(ua->argk[i], "fdcalled") == 0) {
rx.fdcalled = true;
- }
+ } else if (strcasecmp(ua->argk[i], "noautoparent") == 0) {
+ rx.no_auto_parent = true;
+ }
if (!ua->argv[i]) {
continue; /* skip if no value given */
}
"xxxxxxxxx", /* 24 */
"fdcalled", /* 25 */
"when", /* 26 */
-
+ "noautoparent", /* 27 */
NULL
};
tree.ua = ua;
tree.all = rx->all;
tree.hardlinks_in_mem = rx->hardlinks_in_mem;
+ tree.no_auto_parent = rx->no_auto_parent;
last_JobId = 0;
tree.last_dir_acl = NULL;
/*
* Walk up tree marking any unextracted parent to be
* extracted.
*/
- if (extract) {
+ if (!tree->no_auto_parent && extract) {
while (node->parent && !node->parent->extract_dir) {
node = node->parent;
node->extract_dir = true;