Skip to content
Snippets Groups Projects
Commit fb4d8ddf authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer
Browse files

Merge pull request #3335 from owncloud/prevent-scan-loop

Prevent backgroundScan() from looping
parents afdad5c7 71eed76d
No related branches found
No related tags found
No related merge requests found
......@@ -179,9 +179,11 @@ class Scanner {
* walk over any folders that are not fully scanned yet and scan them
*/
public function backgroundScan() {
while (($path = $this->cache->getIncomplete()) !== false) {
$lastPath = null;
while (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) {
$this->scan($path);
$this->cache->correctFolderSize($path);
$lastPath = $path;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment