summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-12-06 08:50:22 +0100
committerGitHub <noreply@github.com>2018-12-06 08:50:22 +0100
commit60681decdd51fe389150d98620d4f3e46dd3caab (patch)
treedd357f2d0a6a107ed9809054b193e8dee4baaf05 /lib
parent402b51d7ac2417f9ba6a87651bb1004d872b089f (diff)
parent72f3882d4b405ad8035f795120f6c2e7a3dda174 (diff)
downloadnextcloud-server-60681decdd51fe389150d98620d4f3e46dd3caab.tar.gz
nextcloud-server-60681decdd51fe389150d98620d4f3e46dd3caab.zip
Merge pull request #12865 from nextcloud/fix/do_not_propogate_in_appdata
No need to propogate changes in appdata
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Cache/Propagator.php15
-rw-r--r--lib/private/Files/Storage/Common.php3
2 files changed, 14 insertions, 4 deletions
diff --git a/lib/private/Files/Cache/Propagator.php b/lib/private/Files/Cache/Propagator.php
index f0cedb39850..989a4d0c7d5 100644
--- a/lib/private/Files/Cache/Propagator.php
+++ b/lib/private/Files/Cache/Propagator.php
@@ -46,12 +46,14 @@ class Propagator implements IPropagator {
private $connection;
/**
- * @param \OC\Files\Storage\Storage $storage
- * @param IDBConnection $connection
+ * @var array
*/
- public function __construct(\OC\Files\Storage\Storage $storage, IDBConnection $connection) {
+ private $ignore = [];
+
+ public function __construct(\OC\Files\Storage\Storage $storage, IDBConnection $connection, array $ignore = []) {
$this->storage = $storage;
$this->connection = $connection;
+ $this->ignore = $ignore;
}
@@ -62,6 +64,13 @@ class Propagator implements IPropagator {
* @suppress SqlInjectionChecker
*/
public function propagateChange($internalPath, $time, $sizeDifference = 0) {
+ // Do not propogate changes in ignored paths
+ foreach ($this->ignore as $ignore) {
+ if (strpos($internalPath, $ignore) === 0) {
+ return;
+ }
+ }
+
$storageId = (int)$this->storage->getStorageCache()->getNumericId();
$parents = $this->getParents($internalPath);
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 72fe3a79792..657a8ba611a 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -368,7 +368,8 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
$storage = $this;
}
if (!isset($storage->propagator)) {
- $storage->propagator = new Propagator($storage, \OC::$server->getDatabaseConnection());
+ $config = \OC::$server->getSystemConfig();
+ $storage->propagator = new Propagator($storage, \OC::$server->getDatabaseConnection(), ['appdata_' . $config->getValue('instanceid')]);
}
return $storage->propagator;
}