diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-04-12 10:31:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-12 10:31:22 +0200 |
commit | ff0ccc80b4d6b6d011cf0ef0468ea319d6e8841f (patch) | |
tree | 6974243d2c77fc5e3efb1abeb2cf5a3dea1431ea | |
parent | 483741ff36ab5ce56d37f65226b76afffb858356 (diff) | |
parent | b65d214f1517f8d788de08de65bdff41c1063e05 (diff) | |
download | nextcloud-server-ff0ccc80b4d6b6d011cf0ef0468ea319d6e8841f.tar.gz nextcloud-server-ff0ccc80b4d6b6d011cf0ef0468ea319d6e8841f.zip |
Merge pull request #31934 from nextcloud/getbyid-setup-fallback
perform a setup if we can't find any mounts containing a file
-rw-r--r-- | lib/private/Files/Node/Root.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/Files/Node/Root.php b/lib/private/Files/Node/Root.php index 7592d4caf37..8b599ddfd75 100644 --- a/lib/private/Files/Node/Root.php +++ b/lib/private/Files/Node/Root.php @@ -419,6 +419,12 @@ class Root extends Folder implements IRootFolder { } $mountsContainingFile = $mountCache->getMountsForFileId($id, $user); + // if the mount isn't in the cache yet, perform a setup first, then try again + if (count($mountsContainingFile) === 0) { + $this->mountManager->getSetupManager()->setupForPath($path, true); + $mountsContainingFile = $mountCache->getMountsForFileId($id, $user); + } + // when a user has access trough the same storage trough multiple paths // (such as an external storage that is both mounted for a user and shared to the user) // the mount cache will only hold a single entry for the storage |