mirror of https://github.com/restic/restic.git
rewriter: simplified logic for empty subdirectories
This commit is contained in:
parent
f3e1bf437f
commit
04c9b35481
|
@ -161,14 +161,11 @@ func (t *TreeRewriter) RewriteTree(ctx context.Context, repo BlobLoadSaver, node
|
||||||
}
|
}
|
||||||
countInserts++
|
countInserts++
|
||||||
}
|
}
|
||||||
} else {
|
// check for empty node list
|
||||||
countInserts = 1
|
if t.opts.KeepEmptyDirecoryGlobal && countInserts == 0 {
|
||||||
}
|
// current subdirectory is empty - due to no includes: create condition here
|
||||||
|
return restic.ID{}, nil
|
||||||
// check for empty node list
|
}
|
||||||
if t.opts.KeepEmptyDirecoryGlobal && countInserts == 0 {
|
|
||||||
// current subdirectory is empty - due to no includes: create condition here
|
|
||||||
return restic.ID{}, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tree, err := tb.Finalize()
|
tree, err := tb.Finalize()
|
||||||
|
|
Loading…
Reference in New Issue