mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-28 12:10:59 +00:00
SCP: if exec() failed return false immediately
This commit is contained in:
parent
1e3ff81e7d
commit
5888c6cef6
@ -170,7 +170,9 @@ class Net_SCP {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->ssh->exec('scp -t ' . $remote_file, false); // -t = to
|
if (!$this->ssh->exec('scp -t ' . $remote_file, false)) { // -t = to
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$temp = $this->_receive();
|
$temp = $this->_receive();
|
||||||
if ($temp !== chr(0)) {
|
if ($temp !== chr(0)) {
|
||||||
@ -239,7 +241,9 @@ class Net_SCP {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->ssh->exec('scp -f ' . $remote_file, false); // -f = from
|
if (!$this->ssh->exec('scp -f ' . $remote_file, false)) { // -f = from
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$this->_send("\0");
|
$this->_send("\0");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user