summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSjors van der Pluijm <sjors@youngguns.nl>2014-04-28 10:20:24 +0200
committerSjors van der Pluijm <sjors@youngguns.nl>2014-04-28 10:20:24 +0200
commitd8be9d96edec4ef8934b46e32298dfbed2b2a0a3 (patch)
treed510db5a82c628c4d7e95e2827b34b71f7bf783f /lib
parent727e3e2359602be975b4a6168a8f8d99ce838e3d (diff)
downloadnextcloud-server-d8be9d96edec4ef8934b46e32298dfbed2b2a0a3.tar.gz
nextcloud-server-d8be9d96edec4ef8934b46e32298dfbed2b2a0a3.zip
fixes #8376
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/storage/local.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/files/storage/local.php b/lib/private/files/storage/local.php
index ff2949d33b6..16689ee905c 100644
--- a/lib/private/files/storage/local.php
+++ b/lib/private/files/storage/local.php
@@ -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) {