diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-02-02 12:06:48 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-02-02 12:06:48 -0800 |
commit | 561e6c4c5be0bcbc837fb983daabd3e91f8a4150 (patch) | |
tree | 132859ffd2f536b4b5131500896aa246fae43241 | |
parent | 23166aa016a85c237de6f4f532578dfbef0fe09b (diff) | |
parent | ed4130474a60599798ff42b8390b433126f658a2 (diff) | |
download | nextcloud-server-561e6c4c5be0bcbc837fb983daabd3e91f8a4150.tar.gz nextcloud-server-561e6c4c5be0bcbc837fb983daabd3e91f8a4150.zip |
Merge pull request #1419 from owncloud/etag_fix
Dav: don't overwrite etag from filecache with old etag from properties table
-rw-r--r-- | lib/connector/sabre/directory.php | 4 | ||||
-rw-r--r-- | lib/connector/sabre/node.php | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php index a7201579366..b210602bbf4 100644 --- a/lib/connector/sabre/directory.php +++ b/lib/connector/sabre/directory.php @@ -138,7 +138,9 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa $propertypath = $row['propertypath']; $propertyname = $row['propertyname']; $propertyvalue = $row['propertyvalue']; - $properties[$propertypath][$propertyname] = $propertyvalue; + if($propertyname !== self::GETETAG_PROPERTYNAME) { + $properties[$propertypath][$propertyname] = $propertyvalue; + } } } } diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php index b48d3b41f24..52995630211 100644 --- a/lib/connector/sabre/node.php +++ b/lib/connector/sabre/node.php @@ -154,7 +154,9 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr } } else { - if( strcmp( $propertyName, self::LASTMODIFIED_PROPERTYNAME) === 0 ) { + if( strcmp( $propertyName, self::GETETAG_PROPERTYNAME) === 0 ) { + \OC\Files\Filesystem::putFileInfo($this->path, array('etag'=> $propertyValue)); + } elseif( strcmp( $propertyName, self::LASTMODIFIED_PROPERTYNAME) === 0 ) { $this->touch($propertyValue); } else { if(!array_key_exists( $propertyName, $existing )) { |