-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[stable9.1] Fix unmerged shares repair targetdecision #25812
[stable9.1] Fix unmerged shares repair targetdecision #25812
Conversation
Pick the most recent subshare that has no parenthesis from duplication which should match whichever name the user picked last. If all subshares have duplicate parenthesis names, use the least recent group share's target instead.
Whenever a group share is created after a direct share, the stime order needs to be properly considered in the repair routine, considering that the direct user share is appended to the $subShares array and breaking its order.
@SergioBertolinSG @jvillafanez can you help reviewing ? The test already makes sure it works as intended. |
$pickedShare = null; | ||
// sort by stime, this also properly sorts the direct user share if any | ||
@usort($subShares, function($a, $b) { | ||
if ($a['stime'] < $b['stime']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth to consider this solution to sort this: http://stackoverflow.com/a/2852918
Reviewed |
@jvillafanez as discussed, since this is a forward port, I'll address your comments in another PR + backports. |
Comments will be addressed in a new PR so 👍 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Forward port of #25543 (comment)
When repairing unmerged shares, make a better decision on which files_target to use to be closer to what the user expects.
@owncloud/sharing @DeepDiver1975