summaryrefslogtreecommitdiffstats
path: root/lib/filesystem.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/filesystem.php')
-rw-r--r--lib/filesystem.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php
index e936dfcce26..0d24b7203bc 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -258,7 +258,7 @@ class OC_Filesystem{
$mtime=filemtime(OC::$SERVERROOT.'/config/mount.php');
$previousMTime=OC_Appconfig::getValue('files','mountconfigmtime',0);
if($mtime>$previousMTime) {//mount config has changed, filecache needs to be updated
- OC_FileCache::clear();
+ OC_FileCache::triggerUpdate();
OC_Appconfig::setValue('files','mountconfigmtime',$mtime);
}
}
@@ -539,12 +539,19 @@ class OC_Filesystem{
return self::$defaultInstance->hasUpdated($path,$time);
}
- static public function removeETagHook($params) {
+ static public function removeETagHook($params, $root = false) {
if (isset($params['path'])) {
$path=$params['path'];
} else {
$path=$params['oldpath'];
}
+
+ if ($root) { // reduce path to the required part of it (no 'username/files')
+ $fakeRootView = new OC_FilesystemView($root);
+ $count = 1;
+ $path=str_replace(OC_App::getStorage("files")->getAbsolutePath($path), "", $fakeRootView->getAbsolutePath($path), $count);
+ }
+
$path = self::normalizePath($path);
OC_Connector_Sabre_Node::removeETagPropertyForPath($path);
}