Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

ftp: attempt to work-around pureftp sending spurious 150 messages

Nick Craig-Wood7d70eb034664
diff --git a/backend/ftp/ftp.go b/backend/ftp/ftp.go
index f96e66a65..c44c01134 100644
--- a/backend/ftp/ftp.go
+++ b/backend/ftp/ftp.go
@@ -799,10 +799,12 @@ func (f *ftpReadCloser) Close() error {
f.f.putFtpConnection(&f.c, nil)
}
// mask the error if it was caused by a premature close
+ // NB StatusAboutToSend is to work around a bug in pureftpd
+ // See: https://github.com/rclone/rclone/issues/3445#issuecomment-521654257
switch errX := err.(type) {
case *textproto.Error:
switch errX.Code {
- case ftp.StatusTransfertAborted, ftp.StatusFileUnavailable:
+ case ftp.StatusTransfertAborted, ftp.StatusFileUnavailable, ftp.StatusAboutToSend:
err = nil
}
}