Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-03-25 19:26:17 +0400
committerBjörn Schießle <schiessle@owncloud.com>2013-03-25 19:26:17 +0400
commit011ab3a11cf2f840da8071167ec894e0ed3a76bc (patch)
tree0eda8819e6a58489dbc6266b5e40c3b6b0c6ceb6
parent9b84c50f15d8f3d6b445601a2a23b2d34e116565 (diff)
listen to touch hook to update the mtime after sync
-rw-r--r--lib/files/cache/updater.php7
-rw-r--r--lib/files/filesystem.php1
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');