From 4a9c64e96be52243b8fc480242bd90428bc470c1 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 4 Feb 2015 16:52:50 +0100 Subject: Only make sure the cache directory exists when we use it --- lib/private/files/filesystem.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib/private/files/filesystem.php') diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index 140d892652f..c7454683e80 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -395,14 +395,7 @@ class Filesystem { */ private static function mountCacheDir($user) { $cacheBaseDir = \OC_Config::getValue('cache_path', ''); - if ($cacheBaseDir === '') { - // use local cache dir relative to the user's home - $subdir = 'cache'; - $view = new \OC\Files\View('/' . $user); - if(!$view->file_exists($subdir)) { - $view->mkdir($subdir); - } - } else { + if ($cacheBaseDir !== '') { $cacheDir = rtrim($cacheBaseDir, '/') . '/' . $user; if (!file_exists($cacheDir)) { mkdir($cacheDir, 0770, true); -- cgit v1.2.3