summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-09-29 13:46:27 +0200
committerVincent Petry <pvince81@owncloud.com>2014-10-08 14:22:17 +0200
commit1030f0a7638dd355ae514c51cf17fe7ff65461b2 (patch)
treee41f99a1ffa4caab022e624217be618477c78541 /apps/files_external/lib
parent5d7bd8be422d9e9904500869182d344f18aa8710 (diff)
downloadnextcloud-server-1030f0a7638dd355ae514c51cf17fe7ff65461b2.tar.gz
nextcloud-server-1030f0a7638dd355ae514c51cf17fe7ff65461b2.zip
Hookup the etag propagator
Diffstat (limited to 'apps/files_external/lib')
-rwxr-xr-xapps/files_external/lib/config.php16
-rw-r--r--apps/files_external/lib/etagpropagator.php1
2 files changed, 17 insertions, 0 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 604700ccf57..92bb891ca21 100755
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -118,6 +118,22 @@ class OC_Mount_Config {
}
$manager->addMount($mount);
}
+
+ if ($data['user']) {
+ $user = \OC::$server->getUserManager()->get($data['user']);
+ $userView = new \OC\Files\View('/' . $user->getUID() . '/files');
+ $changePropagator = new \OC\Files\Cache\ChangePropagator($userView);
+ $etagPropagator = new \OCA\Files_External\EtagPropagator($user, $changePropagator, \OC::$server->getConfig());
+ $etagPropagator->propagateDirtyMountPoints();
+ \OCP\Util::connectHook(
+ \OC\Files\Filesystem::CLASSNAME,
+ \OC\Files\Filesystem::signal_create_mount,
+ $etagPropagator, 'updateHook');
+ \OCP\Util::connectHook(
+ \OC\Files\Filesystem::CLASSNAME,
+ \OC\Files\Filesystem::signal_delete_mount,
+ $etagPropagator, 'updateHook');
+ }
}
/**
diff --git a/apps/files_external/lib/etagpropagator.php b/apps/files_external/lib/etagpropagator.php
index 00571657504..35bf8328cad 100644
--- a/apps/files_external/lib/etagpropagator.php
+++ b/apps/files_external/lib/etagpropagator.php
@@ -97,6 +97,7 @@ class EtagPropagator {
$users = $params[Filesystem::signal_param_users];
$type = $params[Filesystem::signal_param_mount_type];
$mountPoint = $params[Filesystem::signal_param_path];
+ $mountPoint = Filesystem::normalizePath($mountPoint);
if ($type === \OC_Mount_Config::MOUNT_TYPE_GROUP or $users === 'all') {
$this->markDirty($mountPoint, $time);
} else {