Browse Source

fixes #8376

tags/v7.0.0alpha2
Sjors van der Pluijm 10 years ago
parent
commit
d8be9d96ed
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      lib/private/files/storage/local.php

+ 4
- 1
lib/private/files/storage/local.php View File

@@ -44,17 +44,20 @@ if (\OC_Util::runningOnWindows()) {
new \RecursiveDirectoryIterator($this->datadir . $path),
\RecursiveIteratorIterator::CHILD_FIRST
);
foreach ($it as $file) {
while ($it->valid()) {
/**
* @var \SplFileInfo $file
*/
$file = $it->current();
if (in_array($file->getBasename(), array('.', '..'))) {
$it->next();
continue;
} elseif ($file->isDir()) {
rmdir($file->getPathname());
} elseif ($file->isFile() || $file->isLink()) {
unlink($file->getPathname());
}
$it->next();
}
return rmdir($this->datadir . $path);
} catch (\UnexpectedValueException $e) {

Loading…
Cancel
Save