Merge branch '3.0'

This commit is contained in:
terrafrost 2024-01-12 11:00:02 -06:00
commit 48e3b3c264

View File

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