Disable annoying Apple Double files on OS X.
If these ever prove to be desirable, we can revert this or add a mount option.geesefs-0-30-9
parent
3de0df2676
commit
dadff5d9b5
|
@ -76,15 +76,26 @@ type MountConfig struct {
|
|||
|
||||
// Convert to mount options to be passed to package bazilfuse.
|
||||
func (c *MountConfig) bazilfuseOptions() (opts []bazilfuse.MountOption) {
|
||||
isDarwin := runtime.GOOS == "darwin"
|
||||
|
||||
// Enable permissions checking in the kernel. See the comments on
|
||||
// InodeAttributes.Mode.
|
||||
opts = append(opts, bazilfuse.SetOption("default_permissions", ""))
|
||||
|
||||
// OS X only: set novncache when appropriate.
|
||||
if runtime.GOOS == "darwin" && !c.EnableVnodeCaching {
|
||||
// OS X: set novncache when appropriate.
|
||||
if isDarwin && !c.EnableVnodeCaching {
|
||||
opts = append(opts, bazilfuse.SetOption("novncache", ""))
|
||||
}
|
||||
|
||||
// OS X: disable the use of "Apple Double" (._foo and .DS_Store) files, which
|
||||
// just add noise to debug output and can have significant cost on
|
||||
// network-based file systems.
|
||||
//
|
||||
// Cf. https://github.com/osxfuse/osxfuse/wiki/Mount-options
|
||||
if isDarwin {
|
||||
opts = append(opts, bazilfuse.SetOption("noappledouble", ""))
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue