summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-09-06 23:14:43 +0200
committerRobin Appelman <icewind@owncloud.com>2012-09-06 23:14:43 +0200
commitd4fd47d43f01f14f392e55dd0469ee58ca200729 (patch)
tree05bcad4f078337bb383f801de60c7288904a92e3
parent2144b2f37ae90faa03a44e5526c29893c5c7e7d0 (diff)
downloadnextcloud-server-d4fd47d43f01f14f392e55dd0469ee58ca200729.tar.gz
nextcloud-server-d4fd47d43f01f14f392e55dd0469ee58ca200729.zip
clear user filecache after the user mount configuration has changed
-rwxr-xr-xlib/util.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index 42a0f5c7df1..1dcf7c2cbfa 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -58,6 +58,13 @@ class OC_Util {
OC_Filesystem::mount($options['class'], $options['options'], $mountPoint);
}
}
+
+ $mtime=filemtime($user_root.'/mount.php');
+ $previousMTime=OC_Preferences::getValue($user,'files','mountconfigmtime',0);
+ if($mtime>$previousMTime){//mount config has changed, filecache needs to be updated
+ OC_FileCache::clear($user);
+ OC_Preferences::setValue($user,'files','mountconfigmtime',$mtime);
+ }
}
OC_Hook::emit('OC_Filesystem', 'setup', array('user' => $user, 'user_dir' => $user_dir));
}