File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 4949use OC \Files \Mount \MoveableMount ;
5050use OC \Files \Storage \Storage ;
5151use OC \User \User ;
52+ use OCA \Files_Sharing \SharedMount ;
5253use OCP \Constants ;
5354use OCP \Files \Cache \ICacheEntry ;
5455use OCP \Files \EmptyFileNameException ;
@@ -1715,6 +1716,13 @@ public function getPath($id) {
17151716 // reverse the array so we start with the storage this view is in
17161717 // which is the most likely to contain the file we're looking for
17171718 $ mounts = array_reverse ($ mounts );
1719+
1720+ // put non shared mounts in front of the shared mount
1721+ // this prevent unneeded recursion into shares
1722+ usort ($ mounts , function (IMountPoint $ a , IMountPoint $ b ) {
1723+ return $ a instanceof SharedMount && (!$ b instanceof SharedMount) ? 1 : -1 ;
1724+ });
1725+
17181726 foreach ($ mounts as $ mount ) {
17191727 /**
17201728 * @var \OC\Files\Mount\MountPoint $mount
You can’t perform that action at this time.
0 commit comments