diff --git a/lib/filecache.php b/lib/filecache.php
index 07099bcccd59b986edf648d2f5af1d3fa4b389d2..305ba035fb5fe596ae128ced66ed6f68aa284dad 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -488,6 +488,20 @@ class OC_FileCache{
 			$query->execute();
 		}
 	}
+
+	/**
+	 * trigger an update for the cache by setting the mtimes to 0
+	 * @param string $user (optional)
+	 */
+	public static function triggerUpdate($user=''){
+		if($user) {
+			$query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 WHERE `user`=? AND `mimetype`="httpd/unix-directory"');
+			$query->execute(array($user));
+		}else{
+			$query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 AND `mimetype`="httpd/unix-directory"');
+			$query->execute();
+		}
+	}
 }
 
 //watch for changes and try to keep the cache up to date
diff --git a/lib/filesystem.php b/lib/filesystem.php
index c6da826a33942ff896ffbb93b50accfb519c3434..6dbfc6a9bf49b0c8e20c5cd7aba1bfd33120dc84 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -240,7 +240,7 @@ 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_FileCache::triggerUpdate();
 				OC_Appconfig::setValue('files','mountconfigmtime',$mtime);
 			}
 		}
@@ -531,7 +531,7 @@ class OC_Filesystem{
 		if ($root) { // reduce path to the required part of it (no 'username/files')
 			$fakeRootView = new OC_FilesystemView($root);
 			$count = 1;
-			$path=str_replace(OC_App::getStorage("files")->getAbsolutePath(), "", $fakeRootView->getAbsolutePath($path), $count);
+			$path=str_replace(OC_App::getStorage("files")->getAbsolutePath($path), "", $fakeRootView->getAbsolutePath($path), $count);
 		}
 
 		$path = self::normalizePath($path);
diff --git a/lib/util.php b/lib/util.php
index 310ca6afec9cd01c142102289c387334b43a5539..db715a7a0f3b4a945c487884af6884478563e615 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -62,7 +62,7 @@ class OC_Util {
 				$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_FileCache::triggerUpdate($user);
 					OC_Preferences::setValue($user,'files','mountconfigmtime',$mtime);
 				}
 			}
@@ -574,4 +574,4 @@ class OC_Util {
 		}        
 		return $pseudo_byte;
 	}
-}
\ No newline at end of file
+}