mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-27 04:34:45 +01: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