diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 53833aba..04ad79c4 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -1878,7 +1878,7 @@ class SFTP extends SSH2 $offset = $start; } elseif ($mode & self::RESUME) { // 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; } else { $offset = 0;