Browse Source

go fmt

pull/1997/head
Chris Lu 4 years ago
parent
commit
3f3268cd1b
  1. 8
      weed/filesys/dir.go
  2. 12
      weed/filesys/file.go

8
weed/filesys/dir.go

@ -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 { 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 { f := dir.wfs.fsNodeCache.EnsureFsNode(util.NewFullPath(dir.FullPath(), name), func() fs.Node {
return &File{ 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 f.(*File).dir = dir // in case dir node was created later

12
weed/filesys/file.go

@ -28,12 +28,12 @@ var _ = fs.NodeListxattrer(&File{})
var _ = fs.NodeForgetter(&File{}) var _ = fs.NodeForgetter(&File{})
type File struct { 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 { func (file *File) fullpath() util.FullPath {

Loading…
Cancel
Save