Skip to content

Commit

Permalink
Ingore loopbackfs errors for special folders
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Fishman <[email protected]>
  • Loading branch information
macos-fuse-t authored and stapelberg committed May 9, 2024
1 parent a385e05 commit 39f95ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions samples/roloopbackfs/inode.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ func (in *inodeEntry) ListChildren(inodes *sync.Map) ([]*fuseutil.Dirent, error)
if err != nil {
return nil, err
}
dirents := make([]*fuseutil.Dirent, len(children))
dirents := []*fuseutil.Dirent{}
for i, child := range children {

childInode, err := getOrCreateInode(inodes, in.id, child.Name())
if err != nil || childInode == nil {
return nil, nil
continue
}

var childType fuseutil.DirentType
Expand All @@ -133,12 +133,12 @@ func (in *inodeEntry) ListChildren(inodes *sync.Map) ([]*fuseutil.Dirent, error)
childType = fuseutil.DT_File
}

dirents[i] = &fuseutil.Dirent{
dirents = append(dirents, &fuseutil.Dirent{
Offset: fuseops.DirOffset(i + 1),
Inode: childInode.Id(),
Name: child.Name(),
Type: childType,
}
})
}
return dirents, nil
}
Expand Down

0 comments on commit 39f95ce

Please sign in to comment.