summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-11-07 16:28:27 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-01-31 18:28:05 +0000
commit90c57a6700796af63367220d9e2019aea4842fa0 (patch)
treee66543b54a7d3046e616d8b0dfd7e0bac318c778 /lib
parent1c4162bddfe27c54359d719ca41c90c11b7e4934 (diff)
downloadnextcloud-server-90c57a6700796af63367220d9e2019aea4842fa0.tar.gz
nextcloud-server-90c57a6700796af63367220d9e2019aea4842fa0.zip
dont reuse etag for folders marked explicitly unscanned
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Cache/Scanner.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php
index 9f99bbaab2b..371ae5ea2fe 100644
--- a/lib/private/Files/Cache/Scanner.php
+++ b/lib/private/Files/Cache/Scanner.php
@@ -203,7 +203,8 @@ class Scanner extends BasicEmitter implements IScanner {
$fileId = $cacheData['fileid'];
$data['fileid'] = $fileId;
// only reuse data if the file hasn't explicitly changed
- if (isset($data['storage_mtime']) && isset($cacheData['storage_mtime']) && $data['storage_mtime'] === $cacheData['storage_mtime']) {
+ $mtimeUnchanged = isset($data['storage_mtime']) && isset($cacheData['storage_mtime']) && $data['storage_mtime'] === $cacheData['storage_mtime'];
+ if ($mtimeUnchanged && $cacheData['size'] !== -1) {
$data['mtime'] = $cacheData['mtime'];
if (($reuseExisting & self::REUSE_SIZE) && ($data['size'] === -1)) {
$data['size'] = $cacheData['size'];