|
|
@ -28,6 +28,8 @@ type File struct { |
|
|
|
func (file *File) Attr(context context.Context, attr *fuse.Attr) error { |
|
|
|
|
|
|
|
fullPath := filepath.Join(file.dir.Path, file.Name) |
|
|
|
|
|
|
|
if file.attributes == nil { |
|
|
|
item := file.wfs.listDirectoryEntriesCache.Get(fullPath) |
|
|
|
if item != nil { |
|
|
|
entry := item.Value().(*filer_pb.Entry) |
|
|
@ -60,6 +62,7 @@ func (file *File) Attr(context context.Context, attr *fuse.Attr) error { |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
attr.Mode = os.FileMode(file.attributes.FileMode) |
|
|
|
attr.Size = filer2.TotalSize(file.Chunks) |
|
|
|