From 08478feee7577af1eeace51a191068623e33f0e3 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 18 Dec 2020 17:31:36 -0600 Subject: [PATCH] SFTP: resuming uploads didn't work --- phpseclib/Net/SFTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;