diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-09-06 23:10:24 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-09-06 23:10:33 +0200 |
commit | 2144b2f37ae90faa03a44e5526c29893c5c7e7d0 (patch) | |
tree | 110aa1cb5df0a159ba42001468e31d633def8e84 /lib/filesystem.php | |
parent | 39577495e122a9d94507f99c6b3f9f3430735c13 (diff) | |
download | nextcloud-server-2144b2f37ae90faa03a44e5526c29893c5c7e7d0.tar.gz nextcloud-server-2144b2f37ae90faa03a44e5526c29893c5c7e7d0.zip |
clear the filecache if the mount configuration has changed
Diffstat (limited to 'lib/filesystem.php')
-rw-r--r-- | lib/filesystem.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php index c69970467f5..01467b54c8d 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -236,6 +236,13 @@ 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_Appconfig::setValue('files','mountconfigmtime',$mtime); + } } self::$loaded=true; |