summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-05-05 23:08:42 +0200
committerMorris Jobke <hey@morrisjobke.de>2014-05-05 23:08:42 +0200
commit9411ba2acdc498a5aca6632896f9c998081aa8c9 (patch)
treef65f64f4df2cf3012f01c960f8c91cc9c7c02755 /lib
parent45f8d2d3ffd3f4a49391636a66732efab3ad42f6 (diff)
parent91a5e728c0bb836d9489dd947a08ee28056e78de (diff)
downloadnextcloud-server-9411ba2acdc498a5aca6632896f9c998081aa8c9.tar.gz
nextcloud-server-9411ba2acdc498a5aca6632896f9c998081aa8c9.zip
Merge pull request #8459 from owncloud/fix-getUserFolder
fix getUserFolder() of server container
Diffstat (limited to 'lib')
-rw-r--r--lib/private/server.php12
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;
}