From bc5e07cd69a5161290232788531f2073a687c5f6 Mon Sep 17 00:00:00 2001 From: Jim Wigginton Date: Mon, 4 Jul 2011 20:42:05 +0000 Subject: [PATCH] - updates to the upload resume functionality git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@169 21d32557-59b3-4da0-833f-c5933fad653e --- phpseclib/Net/SFTP.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 68061170..c86facb1 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -1095,7 +1095,9 @@ class Net_SFTP extends Net_SSH2 { $offset = 0; if ($mode & NET_SFTP_APPEND) { $size = $this->_size($remote_file); - $offset = $size !== false ? $size : false; + $offset = $size !== false ? $size : 0; + } else { + $flags|= NET_SFTP_OPEN_TRUNCATE; } // --------------