mirror of
https://github.com/nextcloud/server.git
synced 2026-03-04 22:41:13 -05:00
listen to touch hook to update the mtime after sync
This commit is contained in:
parent
c2a49b5c1f
commit
d16dd1ad2a
2 changed files with 8 additions and 0 deletions
7
lib/files/cache/updater.php
vendored
7
lib/files/cache/updater.php
vendored
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue