aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files/filesystem.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-02-04 16:52:50 +0100
committerRobin Appelman <icewind@owncloud.com>2015-02-04 16:52:50 +0100
commit4a9c64e96be52243b8fc480242bd90428bc470c1 (patch)
tree2e5b9327fc90112792123193730726497dd43033 /lib/private/files/filesystem.php
parent09216ef49b04f2a37d853d160853d15741bbe015 (diff)
downloadnextcloud-server-4a9c64e96be52243b8fc480242bd90428bc470c1.tar.gz
nextcloud-server-4a9c64e96be52243b8fc480242bd90428bc470c1.zip
Only make sure the cache directory exists when we use it
Diffstat (limited to 'lib/private/files/filesystem.php')
-rw-r--r--lib/private/files/filesystem.php9
1 files changed, 1 insertions, 8 deletions
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);