aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-07-29 15:34:02 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-07-29 15:34:02 +0100
commit3ef680d96623eb6350015843f56b55b593a053bd (patch)
tree8bfd50c8eb3d0380d7eac55f6d1744d55e984e68
parent332492548fbbff1d1d06286a5d5880cf4beee507 (diff)
parent943fc1b8e56a8e9121bdfb441e540de044075641 (diff)
downloadnextcloud-server-3ef680d96623eb6350015843f56b55b593a053bd.tar.gz
nextcloud-server-3ef680d96623eb6350015843f56b55b593a053bd.zip
Merge pull request #17950 from owncloud/config-dontdetectfschangesinrootbydefault
Disable filesystem_check_changes by default
-rw-r--r--config/config.sample.php2
-rw-r--r--lib/private/files/storage/common.php2
-rw-r--r--tests/lib/files/cache/watcher.php3
3 files changed, 5 insertions, 2 deletions
diff --git a/config/config.sample.php b/config/config.sample.php
index deecbec1ecb..3b5632087f6 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -975,7 +975,7 @@ $CONFIG = array(
* 2 -> Check every time the filesystem is used, causes a performance hit when
* using external storages, not recommended for regular use.
*/
-'filesystem_check_changes' => 1,
+'filesystem_check_changes' => 0,
/**
* All css and js files will be served by the web server statically in one js
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index 847cb8492fe..78f35ad4a6f 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -338,7 +338,7 @@ abstract class Common implements Storage {
}
if (!isset($this->watcher)) {
$this->watcher = new Watcher($storage);
- $globalPolicy = \OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_ONCE);
+ $globalPolicy = \OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_NEVER);
$this->watcher->setPolicy((int)$this->getMountOption('filesystem_check_changes', $globalPolicy));
}
return $this->watcher;
diff --git a/tests/lib/files/cache/watcher.php b/tests/lib/files/cache/watcher.php
index e6947e36a17..acc03cc4c77 100644
--- a/tests/lib/files/cache/watcher.php
+++ b/tests/lib/files/cache/watcher.php
@@ -39,6 +39,7 @@ class Watcher extends \Test\TestCase {
$storage = $this->getTestStorage();
$cache = $storage->getCache();
$updater = $storage->getWatcher();
+ $updater->setPolicy(\OC\Files\Cache\Watcher::CHECK_ONCE);
//set the mtime to the past so it can detect an mtime change
$cache->put('', array('storage_mtime' => 10));
@@ -79,6 +80,7 @@ class Watcher extends \Test\TestCase {
$storage = $this->getTestStorage();
$cache = $storage->getCache();
$updater = $storage->getWatcher();
+ $updater->setPolicy(\OC\Files\Cache\Watcher::CHECK_ONCE);
//set the mtime to the past so it can detect an mtime change
$cache->put('', array('storage_mtime' => 10));
@@ -95,6 +97,7 @@ class Watcher extends \Test\TestCase {
$storage = $this->getTestStorage();
$cache = $storage->getCache();
$updater = $storage->getWatcher();
+ $updater->setPolicy(\OC\Files\Cache\Watcher::CHECK_ONCE);
//set the mtime to the past so it can detect an mtime change
$cache->put('foo.txt', array('storage_mtime' => 10));