Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions pkg/storage/fs/posix/tree/assimilation.go
Original file line number Diff line number Diff line change
Expand Up @@ -897,14 +897,19 @@ func (t *Tree) WarmupIDCache(root string, assimilate, onlyDirty bool) error {
}

// skip irrelevant files
if !t.Ignorer.IsSpaceRoot(path) && t.Ignorer.IsIgnored(path) {
if info.IsDir() {
if t.Ignorer.IsIgnored(path) {
switch {
case t.Ignorer.IsSpaceRoot(path):
// ignore the space root itself, but do not skip the whole tree
return nil
case t.Ignorer.IsRootPath(path):
// ignor the root path itself, but do not skip the whole tree
return nil
case info.IsDir():
return filepath.SkipDir
default:
return nil
}
return nil
}
if t.Ignorer.IsRootPath(path) {
return nil // ignore the root paths
}

if !info.IsDir() && !info.Mode().IsRegular() {
Expand Down