ftp: fix Put mkParentDir failed: 521 for BunnyCDN - fixes #2363

According to RFC 959, error 521 is the correct error return to mean
"dir already exists", so add support for this.
This commit is contained in:
Nick Craig-Wood 2018-06-28 09:01:17 +01:00
parent 947e10eb2b
commit b9b9bce0db

View file

@ -480,6 +480,8 @@ func (f *Fs) mkdir(abspath string) error {
switch errX.Code { switch errX.Code {
case ftp.StatusFileUnavailable: // dir already exists: see issue #2181 case ftp.StatusFileUnavailable: // dir already exists: see issue #2181
err = nil err = nil
case 521: // dir already exists: error number according to RFC 959: issue #2363
err = nil
} }
} }
return err return err