diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-03-25 16:26:17 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-03-25 16:26:17 +0100 |
commit | 011ab3a11cf2f840da8071167ec894e0ed3a76bc (patch) | |
tree | 0eda8819e6a58489dbc6266b5e40c3b6b0c6ceb6 /lib | |
parent | 9b84c50f15d8f3d6b445601a2a23b2d34e116565 (diff) | |
download | nextcloud-server-011ab3a11cf2f840da8071167ec894e0ed3a76bc.tar.gz nextcloud-server-011ab3a11cf2f840da8071167ec894e0ed3a76bc.zip |
listen to touch hook to update the mtime after sync
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files/cache/updater.php | 7 | ||||
-rw-r--r-- | lib/files/filesystem.php | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/files/cache/updater.php b/lib/files/cache/updater.php index e760ba71bc6..d9537e591da 100644 --- a/lib/files/cache/updater.php +++ b/lib/files/cache/updater.php @@ -115,6 +115,13 @@ class Updater { /** * @param array $params */ + static public function touchHook($params) { + self::writeUpdate($params['path']); + } + + /** + * @param array $params + */ static public function renameHook($params) { self::renameUpdate($params['oldpath'], $params['newpath']); } diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index d32e082ade9..ac1cefafac6 100644 --- a/lib/files/filesystem.php +++ b/lib/files/filesystem.php @@ -660,6 +660,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'); |