diff options
| author | chrislu <chris.lu@gmail.com> | 2022-04-06 10:11:11 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-04-06 10:11:11 -0700 |
| commit | 3ab2c0e5c0263de5af35dad91a9107e6038f4203 (patch) | |
| tree | 111b74785b48a250c1de6d6fd55a75a44edb052b | |
| parent | 9d44b89c21c973e88ffd1bf2287e635dcd2a7f2e (diff) | |
| download | seaweedfs-3ab2c0e5c0263de5af35dad91a9107e6038f4203.tar.xz seaweedfs-3ab2c0e5c0263de5af35dad91a9107e6038f4203.zip | |
avoid possible nil attributes
| -rw-r--r-- | weed/mount/weedfs.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/mount/weedfs.go b/weed/mount/weedfs.go index 169925427..2e22e3589 100644 --- a/weed/mount/weedfs.go +++ b/weed/mount/weedfs.go @@ -131,6 +131,9 @@ func (wfs *WFS) maybeReadEntry(inode uint64) (path util.FullPath, fh *FileHandle } var found bool if fh, found = wfs.fhmap.FindFileHandle(inode); found { + if fh.entry.Attributes == nil { + fh.entry.Attributes = &filer_pb.FuseAttributes{} + } return path, fh, fh.entry, fuse.OK } entry, status = wfs.maybeLoadEntry(path) |
