diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 10d98fba..7a4dd7bf 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -2385,7 +2385,11 @@ class SFTP extends SSH2 if ($local_start >= 0) { fseek($fp, $local_start); $size-= $local_start; + } elseif ($mode & NET_SFTP_RESUME) { + fseek($fp, $offset); + $size-= $offset; } + } elseif ($dataCallback) { $size = 0; } else {