1
0
mirror of https://github.com/rclone/rclone.git synced 2025-07-19 21:36:34 +02:00

serve sftp: return not supported error for not supported commands

Before this change, if a hardlink command was issued, rclone would
just ignore it and not return an error.

This changes any unknown operations (including hardlink) to return an
unsupported error.
This commit is contained in:
Nick Craig-Wood
2023-09-22 15:17:40 +01:00
parent 31486aa7e3
commit a6db2e7320

@ -83,6 +83,10 @@ func (v vfsHandler) Filecmd(r *sftp.Request) error {
// link.symlink = r.Filepath // link.symlink = r.Filepath
// v.files[r.Target] = link // v.files[r.Target] = link
return sftp.ErrSshFxOpUnsupported return sftp.ErrSshFxOpUnsupported
case "Link":
return sftp.ErrSshFxOpUnsupported
default:
return sftp.ErrSshFxOpUnsupported
} }
return nil return nil
} }