mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs] IDEA-109608 Apply patch: Fix path detection for new files + test
The index returned by compareNamesImpl is better when it is smaller: it means that more path components were matched, when walking from the ends of compared paths.
This commit is contained in:
@@ -84,7 +84,7 @@ public class MatchPatchPaths {
|
||||
for (VirtualFile file : files) {
|
||||
Pair<VirtualFile, Integer> pair = compareNamesImpl(strings, file, i);
|
||||
if (pair != null && pair.getSecond() < i) {
|
||||
if (best == null || pair.getSecond() > best.getSecond()) {
|
||||
if (best == null || pair.getSecond() < best.getSecond()) {
|
||||
best = pair;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user