From d16dd1ad2aaeb322cd3b1f40dcf367de968cf701 Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Mon, 25 Mar 2013 16:26:17 +0100 Subject: listen to touch hook to update the mtime after sync --- lib/files/cache/updater.php | 7 +++++++ lib/files/filesystem.php | 1 + 2 files changed, 8 insertions(+) (limited to 'lib/files') diff --git a/lib/files/cache/updater.php b/lib/files/cache/updater.php index 3c26ebeb491..92a16d9d9b6 100644 --- a/lib/files/cache/updater.php +++ b/lib/files/cache/updater.php @@ -128,6 +128,13 @@ class Updater { self::writeUpdate($params['path']); } + /** + * @param array $params + */ + static public function touchHook($params) { + self::writeUpdate($params['path']); + } + /** * @param array $params */ diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index 5c3a0cf93e1..1580dfaf637 100644 --- a/lib/files/filesystem.php +++ b/lib/files/filesystem.php @@ -661,6 +661,7 @@ class Filesystem { } \OC_Hook::connect('OC_Filesystem', 'post_write', '\OC\Files\Cache\Updater', 'writeHook'); +\OC_Hook::connect('OC_Filesystem', 'post_touch', '\OC\Files\Cache\Updater', 'touchHook'); \OC_Hook::connect('OC_Filesystem', 'post_delete', '\OC\Files\Cache\Updater', 'deleteHook'); \OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Updater', 'renameHook'); -- cgit v1.2.3