diff options
author | provokateurin <kate@provokateurin.de> | 2024-08-22 12:04:31 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-09-04 18:02:56 +0000 |
commit | 77c38979c60c3dfa1765e4a8f7472f46717fe427 (patch) | |
tree | 7f0667d4758ffcff0763a77c7ccaca1e34c9f76b /lib | |
parent | 0f4086c85a92a416b18f398e3c87f484ca800583 (diff) | |
download | nextcloud-server-77c38979c60c3dfa1765e4a8f7472f46717fe427.tar.gz nextcloud-server-77c38979c60c3dfa1765e4a8f7472f46717fe427.zip |
fix(files): Create non-existent parents of mountpoints
Signed-off-by: provokateurin <kate@provokateurin.de>
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 0de515d8481..efe3bcf5abc 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1531,6 +1531,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); } |