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-26 09:42:55 +0100 |
commit | d16dd1ad2aaeb322cd3b1f40dcf367de968cf701 (patch) | |
tree | a0fa502b3d2d5d3742d9c9f5b19c072ca7cb145b /lib/files | |
parent | c2a49b5c1f7c06497da9285b82775914b0445ddb (diff) | |
download | nextcloud-server-d16dd1ad2aaeb322cd3b1f40dcf367de968cf701.tar.gz nextcloud-server-d16dd1ad2aaeb322cd3b1f40dcf367de968cf701.zip |
listen to touch hook to update the mtime after sync
Diffstat (limited to 'lib/files')
-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 3c26ebeb491..92a16d9d9b6 100644 --- a/lib/files/cache/updater.php +++ b/lib/files/cache/updater.php @@ -131,6 +131,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 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'); |