From 3f6433f7eae377e8d557cd39ef0b063f6cfc41e5 Mon Sep 17 00:00:00 2001 From: Vladimir Buyanov Date: Wed, 8 Aug 2018 23:16:05 +0200 Subject: [PATCH] Workaround for FTP servers, that does not support UTF8 option. (#120) * Workaround for FTP servers, that does not support UTF8 option. --- ftp.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ftp.go b/ftp.go index 35b7106..40dba55 100644 --- a/ftp.go +++ b/ftp.go @@ -188,6 +188,11 @@ func (c *ServerConn) setUTF8() error { return err } + // Workaround for FTP servers, that does not support this option. + if code == StatusBadArguments { + return nil + } + // The ftpd "filezilla-server" has FEAT support for UTF8, but always returns // "202 UTF8 mode is always enabled. No need to send this command." when // trying to use it. That's OK