summaryrefslogtreecommitdiffstats
path: root/lib/filesystem.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-09-30 16:12:16 +0200
committerRobin Appelman <icewind@owncloud.com>2012-09-30 16:12:16 +0200
commit91d12a2f3d860c25ae8daa0cfd838fd6deba5dec (patch)
tree7f56836fd5dfb60c37727f4d50bfc8afa4f7bd5f /lib/filesystem.php
parent113c339c41663c692eae809ada23c4057f9e3ff0 (diff)
downloadnextcloud-server-91d12a2f3d860c25ae8daa0cfd838fd6deba5dec.tar.gz
nextcloud-server-91d12a2f3d860c25ae8daa0cfd838fd6deba5dec.zip
update the filecache by setting mtimes to 0 when the mount configuration has changed instead of clearing the cache
Diffstat (limited to 'lib/filesystem.php')
-rw-r--r--lib/filesystem.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php
index c6da826a339..6dbfc6a9bf4 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -240,7 +240,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);
}
}
@@ -531,7 +531,7 @@ class OC_Filesystem{
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(), "", $fakeRootView->getAbsolutePath($path), $count);
+ $path=str_replace(OC_App::getStorage("files")->getAbsolutePath($path), "", $fakeRootView->getAbsolutePath($path), $count);
}
$path = self::normalizePath($path);