1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

mount/cmount: implement --daemon-timeout flag for OSXFUSE

By default the timeout is 60s which isn't long enough for long
transactions.  The symptoms are rclone just quitting for no reason.
Supplying the --daemon-timeout flag fixes this causing the kernel to
wait longer for rclone.
This commit is contained in:
Nick Craig-Wood
2018-07-18 16:21:35 +01:00
parent ab78eb13e4
commit 473e3c3eb8
3 changed files with 11 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
package mount
import (
"fmt"
"os"
"os/signal"
"syscall"
@@ -63,6 +64,9 @@ func mountOptions(device string) (options []fuse.MountOption) {
if mountlib.WritebackCache {
options = append(options, fuse.WritebackCache())
}
if mountlib.DaemonTimeout != 0 {
options = append(options, fuse.DaemonTimeout(fmt.Sprint(int(mountlib.DaemonTimeout.Seconds()))))
}
if len(mountlib.ExtraOptions) > 0 {
fs.Errorf(nil, "-o/--option not supported with this FUSE backend")
}