mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
improve conditional resuming of uploads
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -101,7 +101,7 @@ func (t *transfer) Seek(offset int64, whence int) (int64, error) {
|
||||
}
|
||||
return ret, err
|
||||
}
|
||||
if t.reader != nil && t.expectedOffset == offset && whence == io.SeekStart {
|
||||
if (t.reader != nil || t.writer != nil) && t.expectedOffset == offset && whence == io.SeekStart {
|
||||
return offset, nil
|
||||
}
|
||||
t.TransferError(errors.New("seek is unsupported for this transfer"))
|
||||
|
||||
Reference in New Issue
Block a user