diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/MatchPatchPaths.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/MatchPatchPaths.java index 7f8b2e821d7a..5dee17f3abb0 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/MatchPatchPaths.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/MatchPatchPaths.java @@ -84,7 +84,7 @@ public class MatchPatchPaths { for (VirtualFile file : files) { Pair 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; } }