瀏覽代碼

Merge pull request #30831 from nextcloud/fix/dav-storage-hasupdated

Fix OC\Files\Storage\DAV::hasUpdated when cache is not set
Côme Chilliet 2 年之前
父節點
當前提交
e85ea0afaf
共有 1 個文件被更改,包括 2 次插入5 次删除
  1. 2 5
      lib/private/Files/Storage/DAV.php

+ 2 - 5
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'];