diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-12-10 23:13:14 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-12-10 23:13:14 -0800 |
| commit | 40ff4eea14bc03a962c78f14ec4e98b49315bad2 (patch) | |
| tree | b477a1354282b02fff765354a9510782584401f8 /weed/filesys | |
| parent | 356bd1b6290439a5fa7cc2db5802257c7f9b1f36 (diff) | |
| download | seaweedfs-40ff4eea14bc03a962c78f14ec4e98b49315bad2.tar.xz seaweedfs-40ff4eea14bc03a962c78f14ec4e98b49315bad2.zip | |
fix nil problem
Diffstat (limited to 'weed/filesys')
| -rw-r--r-- | weed/filesys/dir.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go index 79cf45385..7c86473cd 100644 --- a/weed/filesys/dir.go +++ b/weed/filesys/dir.go @@ -56,6 +56,9 @@ func (dir *Dir) Attr(ctx context.Context, attr *fuse.Attr) error { glog.V(2).Infof("read dir %s attr: %v, error: %v", dir.Path, dir.attributes, err) return err } + if entry == nil { + return fuse.ENOENT + } dir.attributes = entry.Attributes glog.V(2).Infof("dir %s: %v perm: %v", dir.Path, dir.attributes, os.FileMode(dir.attributes.FileMode)) |
