add back last read chunk cache to reader and properly close the reader

This commit is contained in:
Chris Lu
2020-12-08 22:26:46 -08:00
parent 900d22c6ec
commit 8e78187a97
2 changed files with 20 additions and 1 deletions

View File

@@ -202,6 +202,9 @@ func (fh *FileHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) err
}
fh.f.wfs.ReleaseHandle(fh.f.fullpath(), fuse.HandleID(fh.handle))
if closer, ok := fh.f.reader.(io.Closer); ok {
closer.Close()
}
}
return nil