forked from Elara6331/itd
Added unmount function
Designed by Arsen6331
This commit is contained in:
parent
dc53ead339
commit
84c7a33c40
10
fuse.go
10
fuse.go
@ -11,7 +11,15 @@ import (
|
||||
|
||||
func startFUSE(ctx context.Context, dev *infinitime.Device) error {
|
||||
// This is where we'll mount the FS
|
||||
os.Mkdir(k.String("fuse.mountpoint"), 0755)
|
||||
err := os.MkdirAll(k.String("fuse.mountpoint"), 0755)
|
||||
if err != nil && !os.IsExist(err) {
|
||||
return err
|
||||
}
|
||||
|
||||
// Ignore the error because nothing might be mounted on the mountpoint
|
||||
_ = fusefs.Unmount(k.String("fuse.mountpoint"))
|
||||
|
||||
|
||||
root, err := fusefs.BuildRootNode(dev)
|
||||
if err != nil {
|
||||
log.Error("Building root node failed").
|
||||
|
Loading…
Reference in New Issue
Block a user