]> source.dussan.org Git - nextcloud-server.git/commitdiff
clear user filecache after the user mount configuration has changed
authorRobin Appelman <icewind@owncloud.com>
Thu, 6 Sep 2012 21:14:43 +0000 (23:14 +0200)
committerRobin Appelman <icewind@owncloud.com>
Thu, 6 Sep 2012 21:14:43 +0000 (23:14 +0200)
lib/util.php

index 42a0f5c7df13d5ad89d8321b69b9a83f3cdf0286..1dcf7c2cbfa355ce7cf7cf177f523601ced2d82e 100755 (executable)
@@ -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));
                }