diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index ea35f934..4c4570af 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -2199,6 +2199,9 @@ class SFTP extends SSH2 if ($local_start >= 0) { fseek($fp, $local_start); $size -= $local_start; + } elseif ($mode & self::RESUME) { + fseek($fp, $offset); + $size -= $offset; } } elseif ($dataCallback) { $size = 0;