summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-04-22 15:24:38 +0200
committerRobin Appelman <icewind@owncloud.com>2014-04-22 15:24:38 +0200
commitb42ce6c30a214c7089a84eb9c22c0bd576a15fe7 (patch)
tree7073f5cca5574570407a5fcfdd597f1db57efde5 /lib
parent3821a0968950c7320ed9bfa60a5c347060eaff0a (diff)
downloadnextcloud-server-b42ce6c30a214c7089a84eb9c22c0bd576a15fe7.tar.gz
nextcloud-server-b42ce6c30a214c7089a84eb9c22c0bd576a15fe7.zip
Prevent error if previously cached data doesn't have an etag
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/cache/scanner.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index 79159724d16..c0bdde06a75 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -115,11 +115,12 @@ class Scanner extends BasicEmitter {
}
if ($reuseExisting) {
// prevent empty etag
- $etag = $cacheData['etag'];
- $propagateETagChange = false;
- if (empty($etag)) {
+ if (empty($cacheData['etag'])) {
$etag = $data['etag'];
$propagateETagChange = true;
+ } else {
+ $etag = $cacheData['etag'];
+ $propagateETagChange = false;
}
// 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']) {