summaryrefslogtreecommitdiffstats
path: root/lib/connector/sabre/file.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-11 00:43:26 +0200
committerBart Visscher <bartv@thisnet.nl>2012-08-11 00:43:26 +0200
commitc2160433cd171a25c0ddb92959b8ae986d8aaf78 (patch)
treee14d147438204a593e9d78a59f677759b589df3d /lib/connector/sabre/file.php
parent87d1cdb94567d5514e0a2988f69935d932b58ff6 (diff)
parentd3427be5e40b8889fd2b23b9f716e596de29694b (diff)
downloadnextcloud-server-c2160433cd171a25c0ddb92959b8ae986d8aaf78.tar.gz
nextcloud-server-c2160433cd171a25c0ddb92959b8ae986d8aaf78.zip
Merge branch 'master' into routing
Conflicts: lib/base.php
Diffstat (limited to 'lib/connector/sabre/file.php')
-rw-r--r--lib/connector/sabre/file.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/connector/sabre/file.php b/lib/connector/sabre/file.php
index 80f0a0ab4d8..9d571fceb0d 100644
--- a/lib/connector/sabre/file.php
+++ b/lib/connector/sabre/file.php
@@ -47,7 +47,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
OC_Filesystem::file_put_contents($this->path,$data);
- return OC_Connector_Sabre_Node::getETagPropertyForFile($this->path);
+ return OC_Connector_Sabre_Node::getETagPropertyForPath($this->path);
}
/**
@@ -98,7 +98,16 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
if (isset($properties[self::GETETAG_PROPERTYNAME])) {
return $properties[self::GETETAG_PROPERTYNAME];
}
- return $this->getETagPropertyForFile($this->path);
+ return $this->getETagPropertyForPath($this->path);
+ }
+
+ /**
+ * Creates a ETag for this path.
+ * @param string $path Path of the file
+ * @return string|null Returns null if the ETag can not effectively be determined
+ */
+ static protected function createETag($path) {
+ return OC_Filesystem::hash('md5', $path);
}
/**