mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-12 17:17:26 +01:00
Merge branch 'master' into php5
* master: Only fclose($fp) when $mode & NET_SFTP_LOCAL_FILE.
This commit is contained in:
commit
8862b3c97a
@ -1871,7 +1871,9 @@ class Net_SFTP extends Net_SSH2
|
|||||||
$subtemp = $offset + $sent;
|
$subtemp = $offset + $sent;
|
||||||
$packet = pack('Na*N3a*', strlen($handle), $handle, $subtemp / 4294967296, $subtemp, strlen($temp), $temp);
|
$packet = pack('Na*N3a*', strlen($handle), $handle, $subtemp / 4294967296, $subtemp, strlen($temp), $temp);
|
||||||
if (!$this->_send_sftp_packet(NET_SFTP_WRITE, $packet)) {
|
if (!$this->_send_sftp_packet(NET_SFTP_WRITE, $packet)) {
|
||||||
|
if ($mode & NET_SFTP_LOCAL_FILE) {
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$sent+= strlen($temp);
|
$sent+= strlen($temp);
|
||||||
|
Loading…
Reference in New Issue
Block a user