summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarkus Goetz <markus@woboq.com>2013-10-04 04:27:28 -0700
committerMarkus Goetz <markus@woboq.com>2013-10-04 04:27:28 -0700
commit800bf0769ff4ea63c5dcc77eaaf1bce669b73d13 (patch)
treeccbce7fbba64ed27c9f929f9665a6cd5a3036e5b /lib
parent31d5565a18d151ef1518789a5e80520efa4719cd (diff)
parent7f7718888d3d9027a7f12e922b101c82a2e17146 (diff)
downloadnextcloud-server-800bf0769ff4ea63c5dcc77eaaf1bce669b73d13.tar.gz
nextcloud-server-800bf0769ff4ea63c5dcc77eaaf1bce669b73d13.zip
Merge pull request #5091 from guruz/webdav_connector_use_cache_for_etag
DAV: Use fileinfo_cache for ETag
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/node.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/connector/sabre/node.php b/lib/private/connector/sabre/node.php
index 29b7f9e53a5..e65ad7b8bef 100644
--- a/lib/private/connector/sabre/node.php
+++ b/lib/private/connector/sabre/node.php
@@ -207,7 +207,14 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
while( $row = $result->fetchRow()) {
$this->property_cache[$row['propertyname']] = $row['propertyvalue'];
}
- $this->property_cache[self::GETETAG_PROPERTYNAME] = $this->getETagPropertyForPath($this->path);
+
+ // Don't call the static getETagPropertyForPath, its result is not cached
+ $this->getFileinfoCache();
+ if ($this->fileinfo_cache['etag']) {
+ $this->property_cache[self::GETETAG_PROPERTYNAME] = '"'.$this->fileinfo_cache['etag'].'"';
+ } else {
+ $this->property_cache[self::GETETAG_PROPERTYNAME] = null;
+ }
}
// if the array was empty, we need to return everything