From 2144b2f37ae90faa03a44e5526c29893c5c7e7d0 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 6 Sep 2012 23:10:24 +0200 Subject: clear the filecache if the mount configuration has changed --- lib/filesystem.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/filesystem.php') 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; -- cgit v1.2.3