"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
ftp: fix errors from Close of a stream which hasn't been fully read
Nick Craig-Woode172f00e0eb2
diff --git a/ftp/ftp.go b/ftp/ftp.goindex 97d1611ec..de70f64ee 100644--- a/ftp/ftp.go+++ b/ftp/ftp.go@@ -1,8 +1,6 @@// Package ftp interfaces with FTP serverspackage ftp-// FIXME Mover and DirMover are possible using c.Rename-import ("io""net/textproto"@@ -568,6 +566,13 @@ type ftpReadCloser struct {// Close the FTP reader and return the connection to the poolfunc (f *ftpReadCloser) Close() error {err := f.ReadCloser.Close()+ switch errX := err.(type) {+ case *textproto.Error:+ switch errX.Code {+ case ftp.StatusTransfertAborted, ftp.StatusFileUnavailable:+ err = nil+ }+ }f.f.putFtpConnection(&f.c)return err}