diff options
author | Robin Appelman <robin@icewind.nl> | 2022-04-11 20:15:58 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-04-11 20:15:58 +0300 |
commit | b65d214f1517f8d788de08de65bdff41c1063e05 (patch) | |
tree | 67238851b7d98b0f6937718f09137ba9896321c7 /lib | |
parent | 2c0471176c6c562d43b7c871fba466574da3e630 (diff) |
perform a setup if we can't find any mounts containing a file
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-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 |