Fix: prioritize non-installer executables over depth in findMainExe
Build & Deploy / build-and-deploy (push) Failing after 33s
Build & Deploy / build-and-deploy (push) Failing after 33s
The sort was: depth → non-installer → size. This meant a root-level SETUP.EXE (depth 1, installer) beat a subdirectory FALLOUT.EXE (depth 2, non-installer). New sort: non-installer → depth → size. Now any non-installer game EXE wins over installers regardless of depth.
This commit is contained in:
@@ -261,8 +261,8 @@ public class UploadResource {
|
||||
if (candidates.isEmpty()) return null;
|
||||
|
||||
candidates.sort(Comparator
|
||||
.comparingInt(Candidate::depth)
|
||||
.thenComparingInt(c -> c.isInstaller() ? 1 : 0)
|
||||
.comparingInt(c -> c.isInstaller() ? 1 : 0) // non-installer first
|
||||
.thenComparingInt(Candidate::depth)
|
||||
.thenComparingLong(c -> -c.size())); // larger files first
|
||||
|
||||
return candidates.getFirst().path();
|
||||
|
||||
Reference in New Issue
Block a user