mirror of
https://github.com/rclone/rclone.git
synced 2024-12-22 23:22:08 +01:00
ftp: fix mkdir with rsftp which is returning the wrong code
On a successfull MKD, rsftp seems to return code 250 whereas we and the RFC expects 257. This patch makes rclone accept 250 here as well. See: https://forum.rclone.org/t/rclone-pop-up-an-i-o-error-when-creating-a-folder-in-a-mounted-ftp-drive/44368/3
This commit is contained in:
parent
9bd7262dfc
commit
24fdecf107
@ -970,6 +970,8 @@ func (f *Fs) mkdir(ctx context.Context, abspath string) error {
|
||||
f.putFtpConnection(&c, err)
|
||||
if errX := textprotoError(err); errX != nil {
|
||||
switch errX.Code {
|
||||
case ftp.StatusRequestedFileActionOK: // some ftp servers apparently return 250 instead of 257
|
||||
err = nil // see: https://forum.rclone.org/t/rclone-pop-up-an-i-o-error-when-creating-a-folder-in-a-mounted-ftp-drive/44368/
|
||||
case ftp.StatusFileUnavailable: // dir already exists: see issue #2181
|
||||
err = nil
|
||||
case 521: // dir already exists: error number according to RFC 959: issue #2363
|
||||
|
Loading…
Reference in New Issue
Block a user