Skip to content

Commit

Permalink
folders: clone root for each subfolder
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Patil <radialapps@gmail.com>
  • Loading branch information
pulsejet committed Apr 30, 2024
1 parent caea0aa commit ef2a520
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Controller/FoldersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public function sub(string $folder): Http\Response

// Process to response type
$list = array_map(function ($node) use ($root) {
// Base changes permanently remove any mounts outside the
// target folder, so we need to use a clone for each subfolder
$root = clone $root;

// Switch the cloned root to use only this folder
$root->addFolder($node);
$root->baseChange($node->getPath());

Expand Down

0 comments on commit ef2a520

Please sign in to comment.