mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-27 04:34:45 +01: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;
|
||||
}
|
||||
|
||||
$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();
|
||||
if ($temp !== chr(0)) {
|
||||
@ -239,7 +241,9 @@ class Net_SCP {
|
||||
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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user