fix unmount

This commit is contained in:
Diego Fernando Carrión 2024-07-03 18:15:29 +02:00
parent 924d77edec
commit a729080945
Signed by: CRThaze
GPG Key ID: 8279B79A1A7F8194

View File

@ -172,11 +172,14 @@ func (g *gfw) Mount() error {
}
func (g *gfw) Unmount() error {
fmt.Println("Canceling...")
g.cancel()
g.conn.Close()
fmt.Println("Unmounting...")
if err := fuse.Unmount(g.mountpoint); err != nil {
return err
}
fmt.Println("Closing...")
g.conn.Close()
return os.Remove(g.mountpoint)
}