From 930c37e03d5ff80e7cdc9f0ca2cd35d80a06d5c0 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 8 Sep 2018 18:06:33 +0200 Subject: syscallcompat: use O_PATH in OpenDirNofollow This fixes the "0100 directory" problem in reverse mode, and should be slightly faster. --- internal/syscallcompat/sys_darwin.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'internal/syscallcompat/sys_darwin.go') diff --git a/internal/syscallcompat/sys_darwin.go b/internal/syscallcompat/sys_darwin.go index 74681db..993c229 100644 --- a/internal/syscallcompat/sys_darwin.go +++ b/internal/syscallcompat/sys_darwin.go @@ -9,9 +9,14 @@ import ( "github.com/hanwen/go-fuse/fuse" ) -// O_DIRECT means oncached I/O on Linux. No direct equivalent on MacOS and defined -// to zero there. -const O_DIRECT = 0 +const ( + // O_DIRECT means oncached I/O on Linux. No direct equivalent on MacOS and defined + // to zero there. + O_DIRECT = 0 + + // O_PATH is only defined on Linux + O_PATH = 0 +) // Sorry, fallocate is not available on OSX at all and // fcntl F_PREALLOCATE is not accessible from Go. -- cgit v1.2.3