"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
serve ftp: fix failed startup due to config changes
Nick Craig-Woode111ffba9e55
diff --git a/cmd/serve/ftp/ftp.go b/cmd/serve/ftp/ftp.goindex 5e864aaf8..ce50a2e03 100644--- a/cmd/serve/ftp/ftp.go+++ b/cmd/serve/ftp/ftp.go@@ -150,17 +150,21 @@ type driver struct {userPass map[string]string // cache of username => password when using vfs proxy}+func init() {+ fs.RegisterGlobalOptions(fs.OptionsInfo{Name: "ftp", Opt: &Opt, Options: OptionsInfo})+}+var passivePortsRe = regexp.MustCompile(`^\s*\d+\s*-\s*\d+\s*$`)// Make a new FTP to serve the remotefunc newServer(ctx context.Context, f fs.Fs, opt *Options) (*driver, error) {host, port, err := net.SplitHostPort(opt.ListenAddr)if err != nil {- return nil, errors.New("failed to parse host:port")+ return nil, fmt.Errorf("failed to parse host:port from %q", opt.ListenAddr)}portNum, err := strconv.Atoi(port)if err != nil {- return nil, errors.New("failed to parse host:port")+ return nil, fmt.Errorf("failed to parse port number from %q", port)}d := &driver{