diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-09-06 23:14:43 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-09-06 23:14:43 +0200 |
commit | d4fd47d43f01f14f392e55dd0469ee58ca200729 (patch) | |
tree | 05bcad4f078337bb383f801de60c7288904a92e3 | |
parent | 2144b2f37ae90faa03a44e5526c29893c5c7e7d0 (diff) | |
download | nextcloud-server-d4fd47d43f01f14f392e55dd0469ee58ca200729.tar.gz nextcloud-server-d4fd47d43f01f14f392e55dd0469ee58ca200729.zip |
clear user filecache after the user mount configuration has changed
-rwxr-xr-x | lib/util.php | 7 |
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)); } |