fix recursive delete for smb
This commit is contained in:
parent
29deef38b2
commit
de43515cfa
|
@ -17,6 +17,14 @@ abstract class StreamWrapper extends Common {
|
||||||
|
|
||||||
public function rmdir($path) {
|
public function rmdir($path) {
|
||||||
if ($this->file_exists($path)) {
|
if ($this->file_exists($path)) {
|
||||||
|
$dh = $this->opendir($path);
|
||||||
|
while (($file = readdir($dh)) !== false) {
|
||||||
|
if ($this->is_dir($path . '/' . $file)) {
|
||||||
|
$this->rmdir($path . '/' . $file);
|
||||||
|
} else {
|
||||||
|
$this->unlink($path . '/' . $file);
|
||||||
|
}
|
||||||
|
}
|
||||||
$success = rmdir($this->constructUrl($path));
|
$success = rmdir($this->constructUrl($path));
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
return $success;
|
return $success;
|
||||||
|
|
Loading…
Reference in New Issue