mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 11:37:33 +00:00
- updates to _remove directory (thanks, bantu)
This commit is contained in:
parent
e5ee7809c4
commit
e484373a2b
@ -835,13 +835,14 @@ class Net_SFTP extends Net_SSH2 {
|
|||||||
foreach ($dirs as $dir) {
|
foreach ($dirs as $dir) {
|
||||||
if ($dir == end($dirs)) {
|
if ($dir == end($dirs)) {
|
||||||
unset($temp[$dir]);
|
unset($temp[$dir]);
|
||||||
break;
|
return true;
|
||||||
|
}
|
||||||
|
if (!isset($temp[$dir])) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if (isset($new[$key])) {
|
|
||||||
$temp = &$temp[$dir];
|
$temp = &$temp[$dir];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks cache for directory
|
* Checks cache for directory
|
||||||
@ -1623,6 +1624,7 @@ class Net_SFTP extends Net_SSH2 {
|
|||||||
if (!$this->_send_sftp_packet(NET_SFTP_RMDIR, pack('Na*', strlen($path), $path))) {
|
if (!$this->_send_sftp_packet(NET_SFTP_RMDIR, pack('Na*', strlen($path), $path))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
$this->_remove_dir($path);
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user