From cdd9ffc8a5dba2d4c3d83d77fc7806fd017a6b97 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 20 Jul 2012 23:52:47 +0200 Subject: Add ETag support to the Sabre file connector. This is based on the md5 of the file, can be changed later --- lib/filesystem.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/filesystem.php') diff --git a/lib/filesystem.php b/lib/filesystem.php index 148656be00f..67dff95a183 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -483,7 +483,15 @@ class OC_Filesystem{ static public function hasUpdated($path,$time){ return self::$defaultInstance->hasUpdated($path,$time); } + + static public function removeETagHook() { + $path=$params['path']; + OC_Connector_Sabre_Node::removeETagPropertyForFile($path); + } } +OC_Hook::connect('OC_Filesystem','post_write', 'OC_Filesystem','removeETagHook'); +OC_Hook::connect('OC_Filesystem','post_delete','OC_Filesystem','removeETagHook'); +OC_Hook::connect('OC_Filesystem','post_rename','OC_Filesystem','removeETagHook'); OC_Util::setupFS(); require_once('filecache.php'); -- cgit v1.2.3