From: Sjors van der Pluijm Date: Mon, 28 Apr 2014 08:20:24 +0000 (+0200) Subject: fixes #8376 X-Git-Tag: v7.0.0alpha2~320^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d8be9d96edec4ef8934b46e32298dfbed2b2a0a3;p=nextcloud-server.git fixes #8376 --- 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) {