diff options
author | Kate <26026535+provokateurin@users.noreply.github.com> | 2024-09-04 20:00:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-04 20:00:24 +0200 |
commit | 09fef8f0ec279929c01a9a65a53a5c65da4ca52b (patch) | |
tree | 772a20f07a9b27372a3f74b42f4bb1b6105ac98c /lib | |
parent | 2d2a51005c1e2feb159dfb5147c8e0884750b3dd (diff) | |
parent | ebfbe99652c88574bf8fdb1de830df5e694cfda9 (diff) | |
download | nextcloud-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.php | 9 |
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); } |