This commit is contained in:
Chris Lu 2021-04-14 00:30:16 -07:00
parent ca0f07a188
commit 3f3268cd1b
2 changed files with 10 additions and 10 deletions

View file

@ -105,10 +105,10 @@ func (dir *Dir) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {
func (dir *Dir) newFile(name string, entry *filer_pb.Entry) fs.Node {
f := dir.wfs.fsNodeCache.EnsureFsNode(util.NewFullPath(dir.FullPath(), name), func() fs.Node {
return &File{
Name: name,
dir: dir,
wfs: dir.wfs,
entry: entry,
Name: name,
dir: dir,
wfs: dir.wfs,
entry: entry,
}
})
f.(*File).dir = dir // in case dir node was created later

View file

@ -28,12 +28,12 @@ var _ = fs.NodeListxattrer(&File{})
var _ = fs.NodeForgetter(&File{})
type File struct {
Name string
dir *Dir
wfs *WFS
entry *filer_pb.Entry
isOpen int
dirtyMetadata bool
Name string
dir *Dir
wfs *WFS
entry *filer_pb.Entry
isOpen int
dirtyMetadata bool
}
func (file *File) fullpath() util.FullPath {