mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 19:54:57 +00:00
Making Net_SFTP::chdir capable of handling the empty string.
Updated patch after hint from bantu.
This commit is contained in:
parent
9ea67f9edb
commit
44078e5f40
@ -635,8 +635,12 @@ class Net_SFTP extends Net_SSH2 {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Suffix a slash
|
if ($dir === '') {
|
||||||
if (!$dir || $dir[strlen($dir) - 1] != '/') {
|
$dir = './';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Suffix a slash if needed
|
||||||
|
if ($dir[strlen($dir) - 1] != '/') {
|
||||||
$dir.= '/';
|
$dir.= '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user