diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php index 7f19261d97..70266c26e6 100644 --- a/lib/files/cache/scanner.php +++ b/lib/files/cache/scanner.php @@ -74,8 +74,11 @@ class Scanner { $this->scanFile($parent); } } - if ($checkExisting and $data['size'] === -1 and $cacheData = $this->cache->get($file)) { - $data['size'] = $cacheData['size']; + if ($checkExisting) { + $cacheData = $this->cache->get($file) + if ($data['size'] === -1) { + $data['size'] = $cacheData['size']; + } if ($data['mtime'] === $cacheData['mtime']) { $data['etag'] = $cacheData['etag']; }