]> source.dussan.org Git - nextcloud-server.git/commitdiff
fixes #8376
authorSjors van der Pluijm <sjors@youngguns.nl>
Mon, 28 Apr 2014 08:20:24 +0000 (10:20 +0200)
committerSjors van der Pluijm <sjors@youngguns.nl>
Mon, 28 Apr 2014 08:20:24 +0000 (10:20 +0200)
lib/private/files/storage/local.php

index ff2949d33b6b98e9bac977a688ebdef5b05b6e83..16689ee905c283f203e8a08dfe03a215db4098ae 100644 (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) {