]> source.dussan.org Git - nextcloud-server.git/commitdiff
update etag for for the touched file
authorBjörn Schießle <schiessle@owncloud.com>
Wed, 8 May 2013 13:49:45 +0000 (15:49 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Wed, 8 May 2013 13:49:45 +0000 (15:49 +0200)
lib/files/cache/updater.php

index d9537e591dac560349594176e9cbe66f3d8bfe6f..f339ccd5b7670e38e9800e6bd5b3eef4f698ae09 100644 (file)
@@ -116,7 +116,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);
        }
 
        /**