Skip to content

Commit f66859c

Browse files
committed
cgofuse: close guest file system on Destroy
1 parent 32843f0 commit f66859c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/filesystem/cgofuse/fuse.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ func (gw *goWrapper) Destroy() {
9090
}
9191
gw.fileTable = nil
9292
}
93+
if closer, ok := gw.FS.(io.Closer); ok {
94+
if err := closer.Close(); err != nil {
95+
gw.logError(posixRoot, err)
96+
}
97+
}
9398
}
9499

95100
func (gw *goWrapper) Flush(path string, fh fileDescriptor) errNo {

0 commit comments

Comments
 (0)