Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

mount: don't build on go1.10 as bazil/fuse no longer supports it

Nick Craig-Wood706da80d8883
diff --git a/backend/cache/cache_mount_other_test.go b/backend/cache/cache_mount_other_test.go
new file mode 100644
index 000000000..268be43bd
--- /dev/null
+++ b/backend/cache/cache_mount_other_test.go
@@ -0,0 +1,20 @@
+// +build !linux !go1.11
+// +build !darwin !go1.11
+// +build !freebsd !go1.11
+// +build !windows
+
+package cache_test
+
+import (
+ "testing"
+
+ "github.com/rclone/rclone/fs"
+)
+
+func (r *run) mountFs(t *testing.T, f fs.Fs) {
+ panic("mountFs not defined for this platform")
+}
+
+func (r *run) unmountFs(t *testing.T, f fs.Fs) {
+ panic("unmountFs not defined for this platform")
+}
diff --git a/backend/cache/cache_mount_unix_test.go b/backend/cache/cache_mount_unix_test.go
index 4f4595859..6a3d8a334 100644
--- a/backend/cache/cache_mount_unix_test.go
+++ b/backend/cache/cache_mount_unix_test.go
@@ -1,4 +1,4 @@
-// +build !plan9,!windows
+// +build linux,go1.11 darwin,go1.11 freebsd,go1.11
package cache_test
diff --git a/cmd/mount/dir.go b/cmd/mount/dir.go
index bd3cdbd8d..bbc304ffb 100644
--- a/cmd/mount/dir.go
+++ b/cmd/mount/dir.go
@@ -1,4 +1,4 @@
-// +build linux darwin freebsd
+// +build linux,go1.11 darwin,go1.11 freebsd,go1.11
package mount
diff --git a/cmd/mount/file.go b/cmd/mount/file.go
index 2a13feb63..f43de8a20 100644
--- a/cmd/mount/file.go
+++ b/cmd/mount/file.go
@@ -1,4 +1,4 @@
-// +build linux darwin freebsd
+// +build linux,go1.11 darwin,go1.11 freebsd,go1.11
package mount
diff --git a/cmd/mount/fs.go b/cmd/mount/fs.go
index 7943a28d9..5769b44b0 100644
--- a/cmd/mount/fs.go
+++ b/cmd/mount/fs.go
@@ -1,6 +1,6 @@
// FUSE main Fs
-// +build linux darwin freebsd
+// +build linux,go1.11 darwin,go1.11 freebsd,go1.11
package mount
diff --git a/cmd/mount/handle.go b/cmd/mount/handle.go
index f2d5d76bd..bc5bea08f 100644
--- a/cmd/mount/handle.go
+++ b/cmd/mount/handle.go
@@ -1,4 +1,4 @@
-// +build linux darwin freebsd
+// +build linux,go1.11 darwin,go1.11 freebsd,go1.11
package mount
diff --git a/cmd/mount/mount.go b/cmd/mount/mount.go
index f464e7047..a0cc958f6 100644
--- a/cmd/mount/mount.go
+++ b/cmd/mount/mount.go
@@ -1,6 +1,6 @@
// Package mount implents a FUSE mounting system for rclone remotes.
-// +build linux darwin freebsd
+// +build linux,go1.11 darwin,go1.11 freebsd,go1.11
package mount
diff --git a/cmd/mount/mount_test.go b/cmd/mount/mount_test.go
index ea7e7e3aa..839f26503 100644
--- a/cmd/mount/mount_test.go
+++ b/cmd/mount/mount_test.go
@@ -1,4 +1,4 @@
-// +build linux darwin freebsd
+// +build linux,go1.11 darwin,go1.11 freebsd,go1.11
package mount
diff --git a/cmd/mount/mount_unsupported.go b/cmd/mount/mount_unsupported.go
index 5c7bf60db..7d6f12c1f 100644
--- a/cmd/mount/mount_unsupported.go
+++ b/cmd/mount/mount_unsupported.go
@@ -1,6 +1,14 @@
// Build for mount for unsupported platforms to stop go complaining
// about "no buildable Go source files "
-// +build !linux,!darwin,!freebsd
+// Invert the build constraint: linux,go1.11 darwin,go1.11 freebsd,go1.11
+//
+// !((linux&&go1.11) || (darwin&&go1.11) || (freebsd&&go1.11))
+// == !(linux&&go1.11) && !(darwin&&go1.11) && !(freebsd&&go1.11))
+// == (!linux || !go1.11) && (!darwin || go1.11) && (!freebsd || !go1.11))
+
+// +build !linux !go1.11
+// +build !darwin !go1.11
+// +build !freebsd !go1.11
package mount