clean up previously mounted folder
This commit is contained in:
18
weed/mount/unmount/unmount_std.go
Normal file
18
weed/mount/unmount/unmount_std.go
Normal file
@@ -0,0 +1,18 @@
|
||||
//go:build !linux
|
||||
// +build !linux
|
||||
|
||||
package unmount
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func unmount(dir string) error {
|
||||
err := syscall.Unmount(dir, 0)
|
||||
if err != nil {
|
||||
err = &os.PathError{Op: "unmount", Path: dir, Err: err}
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user