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: Fix "501 Not a valid pathname." errors when creating directories

Nick Craig-Wooda9e7e7bcc262
diff --git a/backend/ftp/ftp.go b/backend/ftp/ftp.go
index 0419971fa..cedd07861 100644
--- a/backend/ftp/ftp.go
+++ b/backend/ftp/ftp.go
@@ -693,6 +693,12 @@ func (f *Fs) findItem(ctx context.Context, remote string) (entry *ftp.Entry, err
if err == fs.ErrorObjectNotFound {
return nil, nil
}
+ if errX := textprotoError(err); errX != nil {
+ switch errX.Code {
+ case ftp.StatusBadArguments:
+ err = nil
+ }
+ }
return nil, err
}
if entry != nil {