summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-05-08 15:49:45 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-05-08 23:00:03 +0200
commit0e30e68b22bf3db2872dcff50fe1c0186aa1c57e (patch)
tree7640c949af122a91520a2d1342afe60a7c8299dc /lib
parentb9134dcd6a997f252db8498dec7b422e148a5681 (diff)
downloadnextcloud-server-0e30e68b22bf3db2872dcff50fe1c0186aa1c57e.tar.gz
nextcloud-server-0e30e68b22bf3db2872dcff50fe1c0186aa1c57e.zip
update etag for for the touched file
Diffstat (limited to 'lib')
-rw-r--r--lib/files/cache/updater.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/files/cache/updater.php b/lib/files/cache/updater.php
index 92a16d9d9b6..e054b9dafcf 100644
--- a/lib/files/cache/updater.php
+++ b/lib/files/cache/updater.php
@@ -132,7 +132,15 @@ class Updater {
* @param array $params
*/
static public function touchHook($params) {
- self::writeUpdate($params['path']);
+ $path = $params['path'];
+ list($storage, $internalPath) = self::resolvePath($path);
+ $cache = $storage->getCache();
+ $id = $cache->getId($internalPath);
+ if ($id !== -1) {
+ $cache->update($id, array('etag' => $storage->getETag($internalPath)));
+ self::correctFolder($parent, $time);
+ }
+ self::writeUpdate($path);
}
/**