Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions lib/private/Files/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -1893,12 +1893,16 @@ private function targetIsNotShared(string $user, string $targetPath): bool {
}, $providers));

foreach ($shares as $share) {
$sharedPath = $share->getNode()->getPath();
if ($targetPath === $sharedPath || str_starts_with($targetPath, $sharedPath . '/')) {
$this->logger->debug(
'It is not allowed to move one mount point into a shared folder',
['app' => 'files']);
return false;
try {
$sharedPath = $share->getNode()->getPath();
if ($targetPath === $sharedPath || str_starts_with($targetPath, $sharedPath . '/')) {
$this->logger->debug(
'It is not allowed to move one mount point into a shared folder',
['app' => 'files']);
return false;
}
} catch (NotFoundException $e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the behaviour then? Where will the item be moved? I assumed the item won't be moved because it will fail later?

// ignore
}
}

Expand Down
Loading