aboutsummaryrefslogtreecommitdiffstats
path: root/lib/connector/sabre/directory.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connector/sabre/directory.php')
-rw-r--r--lib/connector/sabre/directory.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php
index 0842fc4fc65..7f8434c7151 100644
--- a/lib/connector/sabre/directory.php
+++ b/lib/connector/sabre/directory.php
@@ -52,7 +52,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
$newPath = $this->path . '/' . $name;
OC_Filesystem::file_put_contents($newPath,$data);
- return OC_Connector_Sabre_Node::getETagPropertyForFile($newPath);
+ return OC_Connector_Sabre_Node::getETagPropertyForPath($newPath);
}
/**
@@ -170,5 +170,25 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
}
+ /**
+ * Returns a list of properties for this nodes.;
+ *
+ * The properties list is a list of propertynames the client requested,
+ * encoded as xmlnamespace#tagName, for example:
+ * http://www.example.org/namespace#author
+ * If the array is empty, all properties should be returned
+ *
+ * @param array $properties
+ * @return void
+ */
+ public function getProperties($properties) {
+ $props = parent::getProperties($properties);
+ if (in_array(self::GETETAG_PROPERTYNAME, $properties)
+ && !isset($props[self::GETETAG_PROPERTYNAME])) {
+ $props[self::GETETAG_PROPERTYNAME] =
+ OC_Connector_Sabre_Node::getETagPropertyForPath($this->path);
+ }
+ return $props;
+ }
}