aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKate <26026535+provokateurin@users.noreply.github.com>2024-09-04 20:00:24 +0200
committerGitHub <noreply@github.com>2024-09-04 20:00:24 +0200
commit09fef8f0ec279929c01a9a65a53a5c65da4ca52b (patch)
tree772a20f07a9b27372a3f74b42f4bb1b6105ac98c /lib
parent2d2a51005c1e2feb159dfb5147c8e0884750b3dd (diff)
parentebfbe99652c88574bf8fdb1de830df5e694cfda9 (diff)
downloadnextcloud-server-09fef8f0ec279929c01a9a65a53a5c65da4ca52b.tar.gz
nextcloud-server-09fef8f0ec279929c01a9a65a53a5c65da4ca52b.zip
Merge pull request #47417 from nextcloud/fix/files/create-mountpoint-parents
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/View.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 64c7f744dd9..2241bc02ae6 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -1496,6 +1496,15 @@ class View {
if ($pos = strpos($relativePath, '/')) {
//mountpoint inside subfolder add size to the correct folder
$entryName = substr($relativePath, 0, $pos);
+
+ // Create parent folders if the mountpoint is inside a subfolder that doesn't exist yet
+ if (!isset($files[$entryName]) && $this->mkdir($path . '/' . $entryName) !== false) {
+ $info = $this->getFileInfo($path . '/' . $entryName);
+ if ($info !== false) {
+ $files[$entryName] = $info;
+ }
+ }
+
if (isset($files[$entryName])) {
$files[$entryName]->addSubEntry($rootEntry, $mountPoint);
}