SFTP: make NO_REALPATH apply to get() as well

This commit is contained in:
terrafrost 2017-06-05 00:44:29 -05:00
parent 5979ed571f
commit 1564a27f6e

View File

@ -2163,9 +2163,11 @@ class Net_SFTP extends Net_SSH2
return false;
}
$remote_file = $this->_realpath($remote_file);
if ($remote_file === false) {
return false;
if (!($mode & NET_SFTP_NO_REALPATH)) {
$remote_file = $this->_realpath($remote_file);
if ($remote_file === false) {
return false;
}
}
$packet = pack('Na*N2', strlen($remote_file), $remote_file, NET_SFTP_OPEN_READ, 0);