Skip to content

Commit

Permalink
SFTP: size() isn't a method..
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Jan 12, 2024
1 parent 978a5d9 commit 6b34da4
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 @@ -2129,8 +2129,8 @@ public function put($remote_file, $data, $mode = self::SOURCE_STRING, $start = -
$offset = $start;
} elseif ($mode & (self::RESUME | self::RESUME_START)) {
// if NET_SFTP_OPEN_APPEND worked as it should _size() wouldn't need to be called
$size = $this->size($remote_file);
$offset = $size !== false ? max($size, 0) : 0;
$stat = $this->stat($remote_file);
$offset = $stat !== false && $stat['size'] ? $stat['size'] : 0;
} else {
$offset = 0;
if ($this->version >= 5) {
Expand Down

0 comments on commit 6b34da4

Please sign in to comment.