forked from TrueCloudLab/rclone
sftp: fix rmdir on Windows based servers (eg CrushFTP)
Before this change we used Remove to remove directories. This works fine on Unix based systems but not so well on Windows based ones. Swap to using RemoveDirectory instead.
This commit is contained in:
parent
50452207d9
commit
4b15c4215c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue