You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
503 B

  1. package command
  2. import (
  3. "github.com/chrislusf/seaweedfs/weed/util"
  4. "github.com/seaweedfs/fuse"
  5. )
  6. func osSpecificMountOptions() []fuse.MountOption {
  7. return []fuse.MountOption{
  8. fuse.AllowNonEmptyMount(),
  9. }
  10. }
  11. func checkMountPointAvailable(dir string) bool {
  12. mountPoint := dir
  13. if mountPoint != "/" && strings.HasSuffix(mountPoint, "/") {
  14. mountPoint = mountPoint[0 : len(mountPoint)-1]
  15. }
  16. if mounted, err := util.Mounted(mountPoint); err != nil || mounted {
  17. return false
  18. }
  19. return true
  20. }