mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +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;
|
||||
}
|
||||
|
||||
// Suffix a slash
|
||||
if (!$dir || $dir[strlen($dir) - 1] != '/') {
|
||||
if ($dir === '') {
|
||||
$dir = './';
|
||||
}
|
||||
|
||||
// Suffix a slash if needed
|
||||
if ($dir[strlen($dir) - 1] != '/') {
|
||||
$dir.= '/';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user