Revert "fix: prefer .exe/.com over .bat in setup executable detection"
Build & Deploy / build-and-deploy (push) Successful in 15s
Build & Deploy / build-and-deploy (push) Successful in 15s
This reverts commit 6a18020c9f.
This commit is contained in:
@@ -105,13 +105,7 @@ public class ExecutableDetector {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (candidates.isEmpty()) return null;
|
if (candidates.isEmpty()) return null;
|
||||||
candidates.sort(Comparator
|
candidates.sort(Comparator.comparingInt(Candidate::depth).thenComparingLong(Candidate::size));
|
||||||
.<Candidate, Integer>comparingInt(c -> {
|
|
||||||
String n = c.path().toLowerCase();
|
|
||||||
return n.endsWith(".bat") ? 1 : 0; // prefer .exe/.com over .bat
|
|
||||||
})
|
|
||||||
.thenComparingInt(Candidate::depth)
|
|
||||||
.thenComparingLong(Candidate::size));
|
|
||||||
return candidates.getFirst().path();
|
return candidates.getFirst().path();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user