mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
Merge pull request #173 from h4cc/patch-1
Making Net_SFTP::chdir capable of handling the empty string.
This commit is contained in:
commit
187f40a247
@ -635,6 +635,11 @@ class Net_SFTP extends Net_SSH2 {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($dir === '') {
|
||||
$dir = './';
|
||||
}
|
||||
|
||||
// Suffix a slash if needed
|
||||
if ($dir[strlen($dir) - 1] != '/') {
|
||||
$dir.= '/';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user