sftpd: add SSH_FXP_FSETSTAT support

This change will fix file editing from sshfs, we need this patch

https://github.com/pkg/sftp/pull/373

for pkg/sftp to support this feature
This commit is contained in:
Nicola Murino
2020-08-20 13:54:36 +02:00
parent 933427310d
commit f41ce6619f
16 changed files with 222 additions and 45 deletions

View File

@@ -330,6 +330,13 @@ func (S3Fs) Chtimes(name string, atime, mtime time.Time) error {
return errors.New("403 chtimes is not supported")
}
// Truncate changes the size of the named file.
// Truncate by path is not supported, while truncating an opened
// file is handled inside base transfer
func (S3Fs) Truncate(name string, size int64) error {
return errors.New("403 truncate is not supported")
}
// ReadDir reads the directory named by dirname and returns
// a list of directory entries.
func (fs S3Fs) ReadDir(dirname string) ([]os.FileInfo, error) {