- updates to _remove directory (thanks, bantu)

This commit is contained in:
terrafrost 2012-06-05 23:44:40 -05:00
parent e5ee7809c4
commit e484373a2b
1 changed files with 5 additions and 3 deletions

View File

@ -835,11 +835,12 @@ class Net_SFTP extends Net_SSH2 {
foreach ($dirs as $dir) {
if ($dir == end($dirs)) {
unset($temp[$dir]);
break;
return true;
}
if (isset($new[$key])) {
$temp = &$temp[$dir];
if (!isset($temp[$dir])) {
return false;
}
$temp = &$temp[$dir];
}
}
@ -1623,6 +1624,7 @@ class Net_SFTP extends Net_SSH2 {
if (!$this->_send_sftp_packet(NET_SFTP_RMDIR, pack('Na*', strlen($path), $path))) {
return false;
}
$this->_remove_dir($path);
$i++;