mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
1ba3456ac2
Signed-off-by: Lei Liu <liul.stone@gmail.com>
28 lines
515 B
Go
28 lines
515 B
Go
package command
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/chrislusf/seaweedfs/weed/util"
|
|
"github.com/seaweedfs/fuse"
|
|
)
|
|
|
|
func osSpecificMountOptions() []fuse.MountOption {
|
|
return []fuse.MountOption{
|
|
fuse.AllowNonEmptyMount(),
|
|
}
|
|
}
|
|
|
|
func checkMountPointAvailable(dir string) bool {
|
|
mountPoint := dir
|
|
if mountPoint != "/" && strings.HasSuffix(mountPoint, "/") {
|
|
mountPoint = mountPoint[0 : len(mountPoint)-1]
|
|
}
|
|
|
|
if mounted, err := util.Mounted(mountPoint); err != nil || mounted {
|
|
return false
|
|
}
|
|
|
|
return true
|
|
}
|