aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2022-01-25 17:24:50 +0100
committerGitHub <noreply@github.com>2022-01-25 17:24:50 +0100
commite85ea0afafde69905b6e646242b110e05ffc1336 (patch)
treef3cd68628c4ee58d16690e90e2ba32b3356e3045
parent014ba751658ab214a5f0fe3bb3164b798240ec01 (diff)
parent5cca86ce1946d68c688b3adbd34f379627138368 (diff)
downloadnextcloud-server-e85ea0afafde69905b6e646242b110e05ffc1336.tar.gz
nextcloud-server-e85ea0afafde69905b6e646242b110e05ffc1336.zip
Merge pull request #30831 from nextcloud/fix/dav-storage-hasupdated
Fix OC\Files\Storage\DAV::hasUpdated when cache is not set
-rw-r--r--lib/private/Files/Storage/DAV.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php
index 161f346e52f..b4a85755b20 100644
--- a/lib/private/Files/Storage/DAV.php
+++ b/lib/private/Files/Storage/DAV.php
@@ -792,11 +792,8 @@ class DAV extends Common {
}
if (isset($response['{DAV:}getetag'])) {
$cachedData = $this->getCache()->get($path);
- $etag = null;
- if (isset($response['{DAV:}getetag'])) {
- $etag = trim($response['{DAV:}getetag'], '"');
- }
- if (!empty($etag) && $cachedData['etag'] !== $etag) {
+ $etag = trim($response['{DAV:}getetag'], '"');
+ if (($cachedData === false) || (!empty($etag) && ($cachedData['etag'] !== $etag))) {
return true;
} elseif (isset($response['{http://open-collaboration-services.org/ns}share-permissions'])) {
$sharePermissions = (int)$response['{http://open-collaboration-services.org/ns}share-permissions'];