Compare commits

...

1 Commits

Author SHA1 Message Date
Robin Appelman cf851a3901 fix: handle shares for which the source is deleted when checking if rename target is shared
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-04-10 16:58:23 +02:00
+10 -6
View File
@@ -1893,12 +1893,16 @@ class View {
}, $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) {
// ignore
}
}