diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-10-01 14:21:49 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-10-01 14:21:49 +0200 |
commit | b7eb3f3dff93762483f6b5a6d647d4855595f318 (patch) | |
tree | 389035167dc9f1928aadd6f8f637adb9ca867ff6 /lib/filesystem.php | |
parent | 88bca9bc49343906b5b498f4d3837002d346b3af (diff) | |
parent | 804372947ae5cdaeaa8c92250f4efb4ae54e8a3f (diff) | |
download | nextcloud-server-b7eb3f3dff93762483f6b5a6d647d4855595f318.tar.gz nextcloud-server-b7eb3f3dff93762483f6b5a6d647d4855595f318.zip |
merge master into filesystem
Diffstat (limited to 'lib/filesystem.php')
-rw-r--r-- | lib/filesystem.php | 11 |
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); } |