Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a29b146a57 | |||
| 6c07f29ab9 |
@@ -105,13 +105,7 @@ public class ExecutableDetector {
|
||||
});
|
||||
|
||||
if (candidates.isEmpty()) return null;
|
||||
candidates.sort(Comparator
|
||||
.<Candidate>comparingInt(c -> {
|
||||
String n = c.path().toLowerCase();
|
||||
return n.endsWith(".bat") ? 1 : 0; // prefer .exe/.com over .bat
|
||||
})
|
||||
.thenComparingInt(Candidate::depth)
|
||||
.thenComparingLong(Candidate::size));
|
||||
candidates.sort(Comparator.comparingInt(Candidate::depth).thenComparingLong(Candidate::size));
|
||||
return candidates.getFirst().path();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user