[stable9.1] Fix unmerged shares repair targetdecision#25812
Merged
[stable9.1] Fix unmerged shares repair targetdecision#25812
Conversation
added 2 commits
August 16, 2016 11:08
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.
This was referenced Aug 16, 2016
Contributor
Author
|
@SergioBertolinSG @jvillafanez can you help reviewing ? The test already makes sure it works as intended. |
| private function findBestTargetName($groupShares, $subShares) { | ||
| $pickedShare = null; | ||
| // sort by stime, this also properly sorts the direct user share if any | ||
| @usort($subShares, function($a, $b) { |
Member
There was a problem hiding this comment.
Worth to consider this solution to sort this: http://stackoverflow.com/a/2852918
Member
|
Reviewed |
Contributor
Author
|
@jvillafanez as discussed, since this is a forward port, I'll address your comments in another PR + backports. |
Member
|
Comments will be addressed in a new PR so 👍 |
2 tasks
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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