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++
|
||||
}
|
||||
} else {
|
||||
countInserts = 1
|
||||
}
|
||||
|
||||
// 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
|
||||
// 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()
|
||||
|
|
Loading…
Reference in New Issue