diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-07-20 23:52:47 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-07-21 00:13:30 +0200 |
commit | cdd9ffc8a5dba2d4c3d83d77fc7806fd017a6b97 (patch) | |
tree | 2c3fcc226540001e0df178fdb7e3b0e029c814e5 /lib/filesystem.php | |
parent | 53bdb049cb3d2b005e5f6d17117f878b74aa0194 (diff) | |
download | nextcloud-server-cdd9ffc8a5dba2d4c3d83d77fc7806fd017a6b97.tar.gz nextcloud-server-cdd9ffc8a5dba2d4c3d83d77fc7806fd017a6b97.zip |
Add ETag support to the Sabre file connector.
This is based on the md5 of the file, can be changed later
Diffstat (limited to 'lib/filesystem.php')
-rw-r--r-- | lib/filesystem.php | 8 |
1 files changed, 8 insertions, 0 deletions
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'); |