From dc589d3070bcb3fdf747170155d1256fde733081 Mon Sep 17 00:00:00 2001 From: Ivan Andreev Date: Fri, 23 Jul 2021 02:01:17 +0300 Subject: [PATCH] ftp: provide valid encoding for ProFtpd, PureFtpd, VsFtpd --- backend/ftp/ftp.go | 17 ++++++++++++----- docs/content/ftp.md | 7 +++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/backend/ftp/ftp.go b/backend/ftp/ftp.go index b5cfe2f24..91c8fad99 100644 --- a/backend/ftp/ftp.go +++ b/backend/ftp/ftp.go @@ -120,13 +120,20 @@ Set to 0 to keep connections indefinitely. Name: config.ConfigEncoding, Help: config.ConfigEncodingHelp, Advanced: true, - // The FTP protocol can't handle trailing spaces (for instance - // pureftpd turns them into _) - // - // proftpd can't handle '*' in file names - // pureftpd can't handle '[', ']' or '*' + // The FTP protocol can't handle trailing spaces + // (for instance, pureftpd turns them into '_') Default: (encoder.Display | encoder.EncodeRightSpace), + Examples: []fs.OptionExample{{ + Value: "Asterisk,Ctl,Dot,Slash", + Help: "ProFTPd can't handle '*' in file names", + }, { + Value: "BackSlash,Ctl,Del,Dot,RightSpace,Slash,SquareBracket", + Help: "PureFTPd can't handle '[]' or '*' in file names", + }, { + Value: "Ctl,LeftPeriod,Slash", + Help: "VsFTPd can't handle file names starting with dot", + }}, }}, }) } diff --git a/docs/content/ftp.md b/docs/content/ftp.md index e883866ef..60e9f1d7b 100644 --- a/docs/content/ftp.md +++ b/docs/content/ftp.md @@ -256,6 +256,13 @@ See: the [encoding section in the overview](/overview/#encoding) for more info. - Env Var: RCLONE_FTP_ENCODING - Type: MultiEncoder - Default: Slash,Del,Ctl,RightSpace,Dot +- Examples: + - "Asterisk,Ctl,Dot,Slash" + - ProFTPd can't handle '*' in file names + - "BackSlash,Ctl,Del,Dot,RightSpace,Slash,SquareBracket" + - PureFTPd can't handle '[]' or '*' in file names + - "Ctl,LeftPeriod,Slash" + - VsFTPd can't handle file names starting with dot {{< rem autogenerated options stop >}}