diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-05-05 18:15:48 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-05-05 18:15:48 +0200 |
commit | 91a5e728c0bb836d9489dd947a08ee28056e78de (patch) | |
tree | 87eaf848ac54879f66559a8d0e925e5f75d42f9e /lib/private/server.php | |
parent | 341fcdc37a74b630ef7d47b5f0b336622c072ddc (diff) | |
download | nextcloud-server-91a5e728c0bb836d9489dd947a08ee28056e78de.tar.gz nextcloud-server-91a5e728c0bb836d9489dd947a08ee28056e78de.zip |
fix getUserFolder() of server container
Diffstat (limited to 'lib/private/server.php')
-rw-r--r-- | lib/private/server.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index 5d90a0b19fc..4c29092cf44 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -240,15 +240,23 @@ class Server extends SimpleContainer implements IServerContainer { * @return \OCP\Files\Folder */ function getUserFolder() { - - $dir = '/files'; + $dir = '/' . \OCP\User::getUser(); $root = $this->getRootFolder(); $folder = null; + if(!$root->nodeExists($dir)) { $folder = $root->newFolder($dir); } else { $folder = $root->get($dir); } + + $dir = '/files'; + if(!$folder->nodeExists($dir)) { + $folder = $folder->newFolder($dir); + } else { + $folder = $folder->get($dir); + } + return $folder; } |