SFTP: resuming uploads didn't work

This commit is contained in:
terrafrost 2020-12-18 17:31:36 -06:00
parent 20852adf78
commit 08478feee7

View File

@ -1878,7 +1878,7 @@ class SFTP extends SSH2
$offset = $start; $offset = $start;
} elseif ($mode & self::RESUME) { } elseif ($mode & self::RESUME) {
// if NET_SFTP_OPEN_APPEND worked as it should _size() wouldn't need to be called // if NET_SFTP_OPEN_APPEND worked as it should _size() wouldn't need to be called
$size = $this->size($remote_file); $size = $this->stat($remote_file)['size'];
$offset = $size !== false ? $size : 0; $offset = $size !== false ? $size : 0;
} else { } else {
$offset = 0; $offset = 0;