Skip to content

Commit 3d1ff52

Browse files
aduffeckrhafer
andcommitted
Fix warming up the id cache for the user storage
Fixes cs3org#3041 Co-authored-by: Ralf Haferkamp <r.haferkamp@opencloud.eu>
1 parent c895a8e commit 3d1ff52

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

pkg/storage/fs/posix/tree/assimilation.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -897,14 +897,19 @@ func (t *Tree) WarmupIDCache(root string, assimilate, onlyDirty bool) error {
897897
}
898898

899899
// skip irrelevant files
900-
if !t.Ignorer.IsSpaceRoot(path) && t.Ignorer.IsIgnored(path) {
901-
if info.IsDir() {
900+
if t.Ignorer.IsIgnored(path) {
901+
switch {
902+
case t.Ignorer.IsSpaceRoot(path):
903+
// ignore the space root itself, but do not skip the whole tree
904+
return nil
905+
case t.Ignorer.IsRootPath(path):
906+
// ignor the root path itself, but do not skip the whole tree
907+
return nil
908+
case info.IsDir():
902909
return filepath.SkipDir
910+
default:
911+
return nil
903912
}
904-
return nil
905-
}
906-
if t.Ignorer.IsRootPath(path) {
907-
return nil // ignore the root paths
908913
}
909914

910915
if !info.IsDir() && !info.Mode().IsRegular() {

0 commit comments

Comments
 (0)