mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-14 18:59:51 +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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($dir === '') {
|
||||||
|
$dir = './';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Suffix a slash if needed
|
||||||
if ($dir[strlen($dir) - 1] != '/') {
|
if ($dir[strlen($dir) - 1] != '/') {
|
||||||
$dir.= '/';
|
$dir.= '/';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user