summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-03-05 17:27:10 +0100
committerRobin Appelman <icewind@owncloud.com>2015-03-11 15:07:23 +0100
commite1f2a6df94af29864778a3ac286887ba51f19b04 (patch)
tree7f4efe6ded5eefdc37d992209969ab7a9eac1612 /lib/private
parent7adda887865d43ea66e4854826cbb64f942af42c (diff)
downloadnextcloud-server-e1f2a6df94af29864778a3ac286887ba51f19b04.tar.gz
nextcloud-server-e1f2a6df94af29864778a3ac286887ba51f19b04.zip
Allow setting the watcher policy as mount option
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/files/cache/watcher.php7
-rw-r--r--lib/private/files/storage/common.php3
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/files/cache/watcher.php b/lib/private/files/cache/watcher.php
index f4572895b09..22c3fb202c3 100644
--- a/lib/private/files/cache/watcher.php
+++ b/lib/private/files/cache/watcher.php
@@ -52,6 +52,13 @@ class Watcher {
}
/**
+ * @return int either \OC\Files\Cache\Watcher::CHECK_NEVER, \OC\Files\Cache\Watcher::CHECK_ONCE, \OC\Files\Cache\Watcher::CHECK_ALWAYS
+ */
+ public function getPolicy() {
+ return $this->watchPolicy;
+ }
+
+ /**
* check $path for updates
*
* @param string $path
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index db66feb4609..d7fff6e6e18 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -331,7 +331,8 @@ abstract class Common implements \OC\Files\Storage\Storage {
}
if (!isset($this->watcher)) {
$this->watcher = new Watcher($storage);
- $this->watcher->setPolicy(\OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_ONCE));
+ $globalPolicy = \OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_ONCE);
+ $this->watcher->setPolicy($this->getMountOption('filesystem_check_changes', $globalPolicy));
}
return $this->watcher;
}