mount: Fix mount breaking on Windows - fixes #1827

This commit is contained in:
ishuah 2017-11-16 15:20:53 +03:00
parent 704e82aab1
commit 31d2fb4e11
1 changed files with 4 additions and 1 deletions

View File

@ -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)