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

sftp: fix rmdir on Windows based servers (eg CrushFTP)

Nick Craig-Wood4b15c4215c31
diff --git a/backend/sftp/sftp.go b/backend/sftp/sftp.go
index 0d8ae45e0..cfa6d4007 100644
--- a/backend/sftp/sftp.go
+++ b/backend/sftp/sftp.go
@@ -599,7 +599,7 @@ func (f *Fs) Rmdir(dir string) error {
if err != nil {
return errors.Wrap(err, "Rmdir")
}
- err = c.sftpClient.Remove(root)
+ err = c.sftpClient.RemoveDirectory(root)
f.putSftpConnection(&c, err)
return err
}