Skip to content

Commit 540edf4

Browse files
committed
implement fsync on fuse files
1 parent 4b8db55 commit 540edf4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fuse/ipns/ipns_unix.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ func CreateRoot(ipfs *core.IpfsNode, keys []ci.PrivKey, ipfspath string) (*Root,
9898

9999
return &Root{
100100
fs: fi,
101+
Ipfs: ipfs,
101102
IpfsRoot: ipfspath,
102103
Keys: keys,
103104
LocalDirs: ldirs,
@@ -300,8 +301,8 @@ func (n *Directory) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {
300301
panic("NYI")
301302
}
302303

303-
func (n *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {
304-
panic("NYI")
304+
func (fi *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {
305+
return fi.fi.Flush()
305306
}
306307

307308
func (dir *Directory) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error) {

0 commit comments

Comments
 (0)