File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111use OC \Files \Storage \Wrapper \Wrapper ;
1212use OCA \Richdocuments \Middleware \WOPIMiddleware ;
1313use OCA \Richdocuments \PermissionManager ;
14+ use OCP \Files \Folder ;
1415use OCP \Files \ForbiddenException ;
1516use OCP \Files \IRootFolder ;
1617use OCP \Files \Storage \ISharedStorage ;
@@ -46,7 +47,8 @@ public function checkFileAccess($path) {
4647 $ isWopiRequest = $ this ->wopiMiddleware ->isWOPIRequest ();
4748
4849 $ isSharedStorage = $ this ->instanceOfStorage (ISharedStorage::class);
49- $ node = $ this ->rootFolder ->get ($ this ->mountPoint )->get ($ path );
50+ $ mountNode = $ this ->rootFolder ->get ($ this ->mountPoint );
51+ $ node = $ mountNode instanceof Folder ? $ mountNode ->get ($ path ) : $ mountNode ;
5052 $ share = $ isSharedStorage && method_exists ($ this , 'getShare ' ) ? $ this ->getShare () : null ;
5153 $ userId = $ this ->userSession ->getUser ()?->getUID();
5254
You can’t perform that action at this time.
0 commit comments