- NET_SFTP_APPEND -> NET_SFTP_RESUME

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@178 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
Jim Wigginton 2011-09-10 05:46:19 +00:00
parent d7c43d03a2
commit 7e416149c1

View File

@ -1275,11 +1275,11 @@ class Net_SFTP extends Net_SSH2 {
$flags = NET_SFTP_OPEN_WRITE | NET_SFTP_OPEN_CREATE; $flags = NET_SFTP_OPEN_WRITE | NET_SFTP_OPEN_CREATE;
// according to the SFTP specs, NET_SFTP_OPEN_APPEND should "force all writes to append data at the end of the file." // according to the SFTP specs, NET_SFTP_OPEN_APPEND should "force all writes to append data at the end of the file."
// in practice, it doesn't seem to do that. // in practice, it doesn't seem to do that.
//$flags|= ($mode & NET_SFTP_APPEND) ? NET_SFTP_OPEN_APPEND : NET_SFTP_OPEN_TRUNCATE; //$flags|= ($mode & NET_SFTP_RESUME) ? NET_SFTP_OPEN_APPEND : NET_SFTP_OPEN_TRUNCATE;
// if NET_SFTP_OPEN_APPEND worked as it should the following (up until the -----------) wouldn't be necessary // if NET_SFTP_OPEN_APPEND worked as it should the following (up until the -----------) wouldn't be necessary
$offset = 0; $offset = 0;
if ($mode & NET_SFTP_APPEND) { if ($mode & NET_SFTP_RESUME) {
$size = $this->_size($remote_file); $size = $this->_size($remote_file);
$offset = $size !== false ? $size : 0; $offset = $size !== false ? $size : 0;
} else { } else {