Skip to content

Commit

Permalink
ua-tree: fix counting root as parent to extract
Browse files Browse the repository at this point in the history
  • Loading branch information
sebsura authored and BareosBot committed Aug 10, 2023
1 parent 4f2cb11 commit 8905abc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/dird/ua_tree.cc
Expand Up @@ -377,9 +377,9 @@ static int SetExtract(UaContext* ua,
// Walk up tree marking any unextracted parent to be extracted.
if (extract) {
while (node->parent && !node->parent->extract_dir) {
if (node->type != TN_NEWDIR) { count += 1; }
node = node->parent;
node->extract_dir = true;
if (node->type != TN_NEWDIR && node->type != TN_ROOT) { count += 1; }
}
}
} else {
Expand Down

0 comments on commit 8905abc

Please sign in to comment.