From 31d2fb4e11b71c4effd83e9759a346ad5d3ace47 Mon Sep 17 00:00:00 2001 From: ishuah Date: Thu, 16 Nov 2017 15:20:53 +0300 Subject: [PATCH] mount: Fix mount breaking on Windows - fixes #1827 --- cmd/mountlib/mount.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/mountlib/mount.go b/cmd/mountlib/mount.go index d39e6c132..1f801d2bb 100644 --- a/cmd/mountlib/mount.go +++ b/cmd/mountlib/mount.go @@ -4,6 +4,7 @@ import ( "io" "log" "os" + "runtime" "github.com/ncw/rclone/cmd" "github.com/ncw/rclone/fs" @@ -166,7 +167,9 @@ like this: defer close(stopStats) } - if !AllowNonEmpty { + // Skip checkMountEmpty if --allow-non-empty flag is used or if + // the Operating System is Windows + if !AllowNonEmpty && runtime.GOOS != "windows" { err := checkMountEmpty(args[1]) if err != nil { log.Fatalf("Fatal error: %v", err)