@@ -60,20 +60,16 @@ protected function overwriteMountPoint(VerifyMountPointEvent $event): void {
6060 }
6161
6262 if ($ event ->getParent () === RoomShareProvider::TALK_FOLDER_PLACEHOLDER ) {
63- try {
64- $ userId = $ view ->getOwner ('/ ' );
65- } catch (\Exception $ e ) {
66- // If we fail to get the owner of the view from the cache,
67- // e.g. because the user never logged in but a cron job runs
68- // We fall back to calculating the owner from the root of the view:
69- if (substr_count ($ view ->getRoot (), '/ ' ) >= 2 ) {
70- // /37c09aa0-1b92-4cf6-8c66-86d8cac8c1d0/files
71- [, $ userId , ] = explode ('/ ' , $ view ->getRoot (), 3 );
72- } else {
73- // Something weird is going on, we can't fall back more
74- // so for now we don't overwrite the share path ¯\_(ツ)_/¯
75- return ;
76- }
63+ // If we fail to get the owner of the view from the cache,
64+ // e.g. because the user never logged in but a cron job runs
65+ // We fall back to calculating the owner from the root of the view:
66+ if (substr_count ($ view ->getRoot (), '/ ' ) >= 2 ) {
67+ // /37c09aa0-1b92-4cf6-8c66-86d8cac8c1d0/files
68+ [, $ userId , ] = explode ('/ ' , $ view ->getRoot (), 3 );
69+ } else {
70+ // Something weird is going on, we can't fall back more
71+ // so for now we don't overwrite the share path ¯\_(ツ)_/¯
72+ return ;
7773 }
7874
7975 $ parent = $ this ->config ->getAttachmentFolder ($ userId );
0 commit comments