diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-07-25 23:08:53 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-07-25 23:09:03 +0200 |
commit | 783d67be6285d730ab7f365e3643bde0c116611a (patch) | |
tree | 54b817b28ae18d9c55dabf1390f6ca69a0cc5b03 /lib/connector/sabre/node.php | |
parent | 381e493a8c777a4e5e95fd72c6a7ed8114c3c978 (diff) | |
download | nextcloud-server-783d67be6285d730ab7f365e3643bde0c116611a.tar.gz nextcloud-server-783d67be6285d730ab7f365e3643bde0c116611a.zip |
Create uniqid ETag for directories
Diffstat (limited to 'lib/connector/sabre/node.php')
-rw-r--r-- | lib/connector/sabre/node.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php index 77aff92cc39..22506f27cf6 100644 --- a/lib/connector/sabre/node.php +++ b/lib/connector/sabre/node.php @@ -204,12 +204,21 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr } /** + * 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 uniqid('', true); + } + + /** * Returns the ETag surrounded by double-quotes for this path. * @param string $path Path of the file * @return string|null Returns null if the ETag can not effectively be determined */ static public function getETagPropertyForPath($path) { - $tag = OC_Filesystem::hash('md5', $path); + $tag = self::createETag($path); if (empty($tag)) { return null; } |