diff --git a/vfs/sftpfs.go b/vfs/sftpfs.go index 7ce307ce..9c3800a5 100644 --- a/vfs/sftpfs.go +++ b/vfs/sftpfs.go @@ -335,6 +335,9 @@ func (fs *SFTPFs) Remove(name string, isDir bool) error { if err := fs.checkConnection(); err != nil { return err } + if isDir { + return fs.sftpClient.RemoveDirectory(name) + } return fs.sftpClient.Remove(name) }