summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2023-04-11 07:57:17 +0200
committerGitHub <noreply@github.com>2023-04-11 07:57:17 +0200
commitcd44ee2053f105f60c668906ed8460605cb1da81 (patch)
tree8093a6b3f6308e9e43b0a3d2e03f4da4b8650521 /apps/files
parent30dd3993b3342021b32dd5bf50d45f11c0183025 (diff)
parentb62e29051ef84af70a245ff04cd3d75eb56187cd (diff)
downloadnextcloud-server-cd44ee2053f105f60c668906ed8460605cb1da81.tar.gz
nextcloud-server-cd44ee2053f105f60c668906ed8460605cb1da81.zip
Merge pull request #37625 from nextcloud/bugfix/noid/transfer-file-new-user
fix: Always create user directory when transfering files to new users
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Service/OwnershipTransferService.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php
index c744573ac99..06c12391df7 100644
--- a/apps/files/lib/Service/OwnershipTransferService.php
+++ b/apps/files/lib/Service/OwnershipTransferService.php
@@ -115,6 +115,9 @@ class OwnershipTransferService {
// setup filesystem
// Requesting the user folder will set it up if the user hasn't logged in before
+ // We need a setupFS for the full filesystem setup before as otherwise we will just return
+ // a lazy root folder which does not create the destination users folder
+ \OC_Util::setupFS($destinationUser->getUID());
\OC::$server->getUserFolder($destinationUser->getUID());
Filesystem::initMountPoints($sourceUid);
Filesystem::initMountPoints($destinationUid);