Skip to content

Commit

Permalink
Merge branch '3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Jan 12, 2024
2 parents 8516c99 + 978a5d9 commit 48e3b3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phpseclib/Net/SFTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -1839,8 +1839,8 @@ public function put(string $remote_file, $data, int $mode = self::SOURCE_STRING,
$offset = $start;
} elseif ($mode & (self::RESUME | self::RESUME_START)) {
// if OpenFlag::APPEND worked as it should _size() wouldn't need to be called
$size = $this->stat($remote_file)['size'];
$offset = $size !== false ? $size : 0;
$size = $this->size($remote_file);
$offset = $size !== false ? max($size, 0) : 0;
} else {
$offset = 0;
if ($this->version >= 5) {
Expand Down

0 comments on commit 48e3b3c

Please sign in to comment.