Browse Source

Workaround for FTP servers, that does not support UTF8 option. (#120)

* Workaround for FTP servers, that does not support UTF8 option.
Vladimir Buyanov 7 years ago
parent
commit
3f6433f7ea
1 changed files with 5 additions and 0 deletions
  1. 5 0
      ftp.go

+ 5 - 0
ftp.go

@@ -188,6 +188,11 @@ func (c *ServerConn) setUTF8() error {
 		return err
 		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
 	// 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
 	// "202 UTF8 mode is always enabled. No need to send this command." when
 	// trying to use it. That's OK
 	// trying to use it. That's OK