summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2024-06-25 16:18:30 -0700
committerJulius Knorr <jus@bitgrid.net>2024-10-28 09:17:33 +0100
commita694727aa6ffd7063b5430c2e7c51d450cdd45e9 (patch)
tree9fdbe1a488fffb353bc9194442543990fd71b3d1
parente5b6634c8fdd4809d68130656a67782c00f9cf40 (diff)
downloadnextcloud-server-a694727aa6ffd7063b5430c2e7c51d450cdd45e9.tar.gz
nextcloud-server-a694727aa6ffd7063b5430c2e7c51d450cdd45e9.zip
fix: Fix "Unknown path" error when source user `files` folder has not been initialized
Signed-off-by: Christopher Ng <chrng8@gmail.com>
-rw-r--r--apps/files/lib/Service/OwnershipTransferService.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php
index b6e0d437b4a..15110e4349f 100644
--- a/apps/files/lib/Service/OwnershipTransferService.php
+++ b/apps/files/lib/Service/OwnershipTransferService.php
@@ -107,7 +107,9 @@ class OwnershipTransferService {
// 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($sourceUser->getUID());
\OC_Util::setupFS($destinationUser->getUID());
+ \OC::$server->getUserFolder($sourceUser->getUID());
\OC::$server->getUserFolder($destinationUser->getUID());
Filesystem::initMountPoints($sourceUid);
Filesystem::initMountPoints($destinationUid);