Directories aren't excluded from pruning logic (#548)

This commit is contained in:
Frederik Ring
2025-02-28 17:21:35 +01:00
committed by GitHub
parent 0f30b959f8
commit 016e470f5f
3 changed files with 13 additions and 9 deletions

View File

@@ -96,7 +96,7 @@ func (b *localStorage) Prune(deadline time.Time, pruningPrefix string) (*storage
)
}
if fi.Mode()&os.ModeSymlink != os.ModeSymlink {
if !fi.IsDir() && fi.Mode()&os.ModeSymlink != os.ModeSymlink {
candidates = append(candidates, candidate)
}
}