summaryrefslogtreecommitdiffstats
path: root/lib/private/files/filesystem.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-03-11 16:49:24 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-03-11 16:49:24 +0100
commit82254ad5efb65e8650567f49343ec37eb55e2f3e (patch)
treecff7ae5f85d05e3b92796288d3cdaec05eb87e9c /lib/private/files/filesystem.php
parent73dc02d42c385cc451eb65d0aaf6ec06eaceb6a6 (diff)
parent4a9c64e96be52243b8fc480242bd90428bc470c1 (diff)
downloadnextcloud-server-82254ad5efb65e8650567f49343ec37eb55e2f3e.tar.gz
nextcloud-server-82254ad5efb65e8650567f49343ec37eb55e2f3e.zip
Merge pull request #13893 from owncloud/create-cachedir-on-user
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 04f82d88cd1..c3a062cd2d6 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);