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

serve ftp: disable on plan9 since it doesn't compile

Nick Craig-Woodd4ee7277c043
diff --git a/cmd/serve/ftp/ftp.go b/cmd/serve/ftp/ftp.go
index ee2d6ca3e..1789b066e 100644
--- a/cmd/serve/ftp/ftp.go
+++ b/cmd/serve/ftp/ftp.go
@@ -1,3 +1,7 @@
+// Package ftp implements an FTP server for rclone
+
+//+build !plan9
+
package ftp
import (
diff --git a/cmd/serve/ftp/ftp_test.go b/cmd/serve/ftp/ftp_test.go
index e40221fca..7f3514f6f 100644
--- a/cmd/serve/ftp/ftp_test.go
+++ b/cmd/serve/ftp/ftp_test.go
@@ -3,7 +3,7 @@
//
// We skip tests on platforms with troublesome character mappings
-//+build !windows,!darwin
+//+build !windows,!darwin,!plan9
package ftp
diff --git a/cmd/serve/ftp/ftp_unsupported.go b/cmd/serve/ftp/ftp_unsupported.go
new file mode 100644
index 000000000..76b4b2ecf
--- /dev/null
+++ b/cmd/serve/ftp/ftp_unsupported.go
@@ -0,0 +1,11 @@
+// Build for unsupported platforms to stop go complaining
+// about "no buildable Go source files "
+
+// +build plan9
+
+package ftp
+
+import "github.com/spf13/cobra"
+
+// Command definition is nil to show not implemented
+var Command *cobra.Command = nil
diff --git a/cmd/serve/serve.go b/cmd/serve/serve.go
index 719860be7..6454f1afa 100644
--- a/cmd/serve/serve.go
+++ b/cmd/serve/serve.go
@@ -15,7 +15,9 @@ func init() {
Command.AddCommand(http.Command)
Command.AddCommand(webdav.Command)
Command.AddCommand(restic.Command)
- Command.AddCommand(ftp.Command)
+ if ftp.Command != nil {
+ Command.AddCommand(ftp.Command)
+ }
cmd.Root.AddCommand(Command)
}