mirror of
https://github.com/danog/phpseclib.git
synced 2024-11-27 04:46:26 +01:00
SCP: add support for file names with spaces
This commit is contained in:
parent
949cfcc867
commit
9edf905939
@ -170,7 +170,9 @@ class Net_SCP
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->ssh->exec('scp -t ' . $remote_file, false)) { // -t = to
|
||||
$filename = strpos($remote_file, ' ') !== false ? '"' . $remote_file . '"' : $remote_file;
|
||||
|
||||
if (!$this->ssh->exec('scp -t ' . $filename, false)) { // -t = to
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -245,7 +247,9 @@ class Net_SCP
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->ssh->exec('scp -f ' . $remote_file, false)) { // -f = from
|
||||
$filename = strpos($remote_file, ' ') !== false ? '"' . $remote_file . '"' : $remote_file;
|
||||
|
||||
if (!$this->ssh->exec('scp -f ' . $filename, false)) { // -f = from
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user