mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
sftpd: remove unused expectedSize field from Transfer struct
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -60,11 +60,6 @@ func (c Connection) Fileread(request *sftp.Request) (io.ReaderAt, error) {
|
||||
return nil, vfs.GetSFTPError(c.fs, err)
|
||||
}
|
||||
|
||||
fi, err := c.fs.Stat(p)
|
||||
if err != nil {
|
||||
return nil, vfs.GetSFTPError(c.fs, err)
|
||||
}
|
||||
|
||||
file, r, cancelFn, err := c.fs.Open(p)
|
||||
if err != nil {
|
||||
c.Log(logger.LevelWarn, logSender, "could not open file %#v for reading: %+v", p, err)
|
||||
@@ -91,7 +86,6 @@ func (c Connection) Fileread(request *sftp.Request) (io.ReaderAt, error) {
|
||||
transferError: nil,
|
||||
isFinished: false,
|
||||
minWriteOffset: 0,
|
||||
expectedSize: fi.Size(),
|
||||
isExcludedFromQuota: c.User.IsFileExcludedFromQuota(request.Filepath),
|
||||
lock: new(sync.Mutex),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user