summaryrefslogtreecommitdiffstats
path: root/lib/files
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-05-21 09:15:22 -0700
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-05-21 09:15:22 -0700
commitfb4d8ddf0a76da7e9f806b837f9cf23699671f75 (patch)
tree2a3c99a9a459c97a6139eda2b5dfd9e4e2c6cbe0 /lib/files
parentafdad5c74da5c163b01f43046224b376a23f4e60 (diff)
parent71eed76dbef92363d5f6eeb423496c6b8dac0579 (diff)
downloadnextcloud-server-fb4d8ddf0a76da7e9f806b837f9cf23699671f75.tar.gz
nextcloud-server-fb4d8ddf0a76da7e9f806b837f9cf23699671f75.zip
Merge pull request #3335 from owncloud/prevent-scan-loop
Prevent backgroundScan() from looping
Diffstat (limited to 'lib/files')
-rw-r--r--lib/files/cache/scanner.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php
index 661bc486330..b99dea23cbc 100644
--- a/lib/files/cache/scanner.php
+++ b/lib/files/cache/scanner.php
@@ -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;
}
}
}