Skip to content

Commit

Permalink
Add OSXFUSE mount options NoAppleXattr and NoAppleDouble
Browse files Browse the repository at this point in the history
Thanks to Dave Presotto <[email protected]> via
#136
  • Loading branch information
tv42 committed Jun 6, 2016
1 parent 19db536 commit ba03ef5
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
23 changes: 23 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,29 @@ func VolumeName(name string) MountOption {
return volumeName(name)
}

// NoAppleDouble makes OSXFUSE disallow files with names used by OS X
// to store extended attributes on file systems that do not support
// them natively.
//
// Such file names are:
//
// ._*
// .DS_Store
//
// OS X only. Others ignore this option.
func NoAppleDouble() MountOption {
return noAppleDouble
}

// NoAppleXattr makes OSXFUSE disallow extended attributes with the
// prefix "com.apple.". This disables persistent Finder state and
// other such information.
//
// OS X only. Others ignore this option.
func NoAppleXattr() MountOption {
return noAppleXattr
}

// DaemonTimeout sets the time in seconds between a request and a reply before
// the FUSE mount is declared dead.
//
Expand Down
10 changes: 10 additions & 0 deletions options_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,13 @@ func daemonTimeout(name string) MountOption {
return nil
}
}

func noAppleXattr(conf *mountConfig) error {
conf.options["noapplexattr"] = ""
return nil
}

func noAppleDouble(conf *mountConfig) error {
conf.options["noappledouble"] = ""
return nil
}
8 changes: 8 additions & 0 deletions options_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ func daemonTimeout(name string) MountOption {
return nil
}
}

func noAppleXattr(conf *mountConfig) error {
return nil
}

func noAppleDouble(conf *mountConfig) error {
return nil
}
8 changes: 8 additions & 0 deletions options_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ func volumeName(name string) MountOption {
func daemonTimeout(name string) MountOption {
return dummyOption
}

func noAppleXattr(conf *mountConfig) error {
return nil
}

func noAppleDouble(conf *mountConfig) error {
return nil
}

0 comments on commit ba03ef5

Please sign in to comment.