From b9b5a4f5fca99746b60659f790db9676571c400b Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 17 Mar 2015 16:22:19 +1100 Subject: [PATCH] Updated MountConfig.bazilfuseOptions. --- mounted_file_system.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mounted_file_system.go b/mounted_file_system.go index d456561..4f3741b 100644 --- a/mounted_file_system.go +++ b/mounted_file_system.go @@ -16,6 +16,7 @@ package fuse import ( "errors" + "runtime" "github.com/jacobsa/bazilfuse" "golang.org/x/net/context" @@ -134,12 +135,13 @@ type MountConfig struct { // Convert to mount options to be passed to package bazilfuse. func (c *MountConfig) bazilfuseOptions() (opts []bazilfuse.MountOption) { - panic("TODO: Test and support MountConfig.EnableVnodeCaching") + // Enable permissions checking in the kernel. See the comments on + // InodeAttributes.Mode. + opts = append(opts, bazilfuse.SetOption("default_permissions", "")) - opts = []bazilfuse.MountOption{ - // Enable permissions checking in the kernel. See the comments on - // InodeAttributes.Mode. - bazilfuse.SetOption("default_permissions", ""), + // OS X only: set novncache when appropriate. + if runtime.GOOS == "darwin" && !c.EnableVnodeCaching { + opts = append(opts, bazilfuse.SetOption("novncache", "")) } return