-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[stable28] fix: improve checks for moving shares/storages into other mounts #50160
base: stable28
Are you sure you want to change the base?
Conversation
Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: Christopher Ng <[email protected]>
Signed-off-by: Robin Appelman <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
Signed-off-by: Robin Appelman <[email protected]> [skip ci]
/compile / |
Signed-off-by: nextcloud-command <[email protected]>
63827ed
to
a19a04a
Compare
@icewind1991 I tried to fix the PSALM warnings, can you please double check If I did something wrong |
@@ -806,13 +827,19 @@ | |||
} | |||
// moving a file/folder within the same mount point | |||
} elseif ($storage1 === $storage2) { | |||
if (count($movedMounts) > 0) { | |||
$this->validateMountMove($movedMounts, $mount1, $mount2, !$this->targetIsNotShared($targetUser, $absolutePath2)); |
Check failure
Code scanning / Psalm
InvalidArgument Error
if ($storage1) { | ||
$result = $storage1->rename($internalPath1, $internalPath2); | ||
} else { | ||
$result = false; | ||
} | ||
// moving a file/folder between storages (from $storage1 to $storage2) | ||
} else { | ||
if (count($movedMounts) > 0) { | ||
$this->validateMountMove($movedMounts, $mount1, $mount2, !$this->targetIsNotShared($targetUser, $absolutePath2)); |
Check failure
Code scanning / Psalm
InvalidArgument Error
Backport of #49552
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.