report error if entry not found

This commit is contained in:
Chris Lu 2021-03-16 02:55:49 -07:00
parent 91a3ac9731
commit c00dd5e62e

View file

@ -56,6 +56,10 @@ func (file *File) Attr(ctx context.Context, attr *fuse.Attr) (err error) {
}
}
if entry == nil {
return fuse.ENOENT
}
// attr.Inode = file.fullpath().AsInode()
attr.Valid = time.Second
attr.Mode = os.FileMode(entry.Attr.Mode)