From 2def9c20d9488dcf8e8a6f53302c7c5f36a0bd39 Mon Sep 17 00:00:00 2001 From: Gravita Date: Thu, 22 Apr 2021 21:03:43 +0700 Subject: [PATCH] [FIX] Support SPI in Launcher --- .../gravit/launchserver/binary/tasks/AttachJarsTask.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/AttachJarsTask.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/AttachJarsTask.java index ad64a160..228156d1 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/AttachJarsTask.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/AttachJarsTask.java @@ -55,10 +55,15 @@ public Path process(Path inputFile) throws IOException { private void attach(ZipOutputStream output, Path inputFile, List lst) throws IOException { for (Path p : lst) { - AdditionalFixesApplyTask.apply(inputFile, p, output, srv, (e) -> exclusions.stream().anyMatch(e.getName()::startsWith), false); + AdditionalFixesApplyTask.apply(inputFile, p, output, srv, (e) -> filter(e.getName()), false); } } + private boolean filter(String name) { + if(name.startsWith("META-INF/services")) return false; + return exclusions.stream().anyMatch(name::startsWith); + } + @Override public boolean allowDelete() { return true;