mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Prevent backgroundScan() from looping if opendir() is failing for the same path
This commit is contained in:
parent
1ec92b6377
commit
71eed76dbe
1 changed files with 3 additions and 1 deletions
4
lib/files/cache/scanner.php
vendored
4
lib/files/cache/scanner.php
vendored
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue