diff --git a/backend/main/java/de/griefed/serverpackcreator/ServerPackHandler.java b/backend/main/java/de/griefed/serverpackcreator/ServerPackHandler.java index cb6ff71f48d7685b23005c7b1a796f0a022a66ae..41ec19a2cdf87614af322cf123105d6b9fcc0447 100644 --- a/backend/main/java/de/griefed/serverpackcreator/ServerPackHandler.java +++ b/backend/main/java/de/griefed/serverpackcreator/ServerPackHandler.java @@ -2611,6 +2611,7 @@ public class ServerPackHandler { List<File> filesToExclude = new ArrayList<>(100); if (APPLICATIONPROPERTIES.isZipFileExclusionEnabled()) { + APPLICATIONPROPERTIES .getFilesToExcludeFromZipArchive() .forEach( @@ -2632,14 +2633,16 @@ public class ServerPackHandler { LOG.info("File exclusion from ZIP-archives deactivated."); } + String comment = "Server pack made with ServerPackCreator " + + APPLICATIONPROPERTIES.SERVERPACKCREATOR_VERSION() + + " by Griefed."; + zipParameters.setIncludeRootFolder(false); - zipParameters.setFileComment( - "Server pack made with ServerPackCreator " - + APPLICATIONPROPERTIES.SERVERPACKCREATOR_VERSION() - + " by Griefed."); + zipParameters.setFileComment(comment); try (ZipFile zip = new ZipFile(String.format("%s_server_pack.zip", destination))) { + zip.setComment(comment); zip.addFolder(new File(destination), zipParameters); } catch (IOException ex) {