diff options
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/Service/OwnershipTransferService.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php index 670e6419d75..661a7e66e10 100644 --- a/apps/files/lib/Service/OwnershipTransferService.php +++ b/apps/files/lib/Service/OwnershipTransferService.php @@ -144,13 +144,12 @@ class OwnershipTransferService { throw new TransferOwnershipException("Unknown path provided: $path", 1); } - if ($move && ( - !$view->is_dir($finalTarget) || ( - !$firstLogin && - count($view->getDirectoryContent($finalTarget)) > 0 - ) - ) - ) { + if ($move && !$view->is_dir($finalTarget)) { + // Initialize storage + \OC_Util::setupFS($destinationUser->getUID()); + } + + if ($move && !$firstLogin && count($view->getDirectoryContent($finalTarget)) > 0) { throw new TransferOwnershipException("Destination path does not exists or is not empty", 1); } |