From 4e64ee38e2de4995ba4c0a2053c578fc18c770b1 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 24 Jun 2019 11:54:38 +0100 Subject: [PATCH] mount: default --deamon-timout to 15 minutes on macOS and FreeBSD See: https://forum.rclone.org/t/macos-fuse-mount-contents-disappear-after-writes-while-using-vfs-cache/10566/ --- cmd/mountlib/mount.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/mountlib/mount.go b/cmd/mountlib/mount.go index ecb755f4a..35d1d6a24 100644 --- a/cmd/mountlib/mount.go +++ b/cmd/mountlib/mount.go @@ -38,6 +38,13 @@ var ( DaemonTimeout time.Duration // OSXFUSE only ) +func init() { + // DaemonTimeout defaults to non zero for macOS and freebsd + if runtime.GOOS == "darwin" || runtime.GOOS == "freebsd" { + DaemonTimeout = 15 * time.Minute + } +} + // Check is folder is empty func checkMountEmpty(mountpoint string) error { fp, fpErr := os.Open(mountpoint)