From: Marco Zanon Date: Sat, 2 Mar 2024 17:02:54 +0000 (+0000) Subject: Fixed a bug which prevented full license files to be written properly. X-Git-Tag: 9.2.1~4 X-Git-Url: https://gitweb.marcozanon.com/?a=commitdiff_plain;h=415b879e0d83c919212bd32153d17e9fe6c5a9bb;p=Macaco Fixed a bug which prevented full license files to be written properly. --- diff --git a/CHANGELOG b/CHANGELOG index 9ff8ba1..847a834 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,11 @@ Macaco Copyright (c) 2009-2024 Marco Zanon . See LICENSE for details. +------------------ +9.2.1 (2024-03-02) +------------------ +* Fixed a bug which prevented full license files to be written properly. + ------------------ 9.2.0 (2024-02-29) ------------------ diff --git a/src/main/java/com/marcozanon/macaco/licensing/MLicenseManager.java b/src/main/java/com/marcozanon/macaco/licensing/MLicenseManager.java index f90fe07..8020158 100644 --- a/src/main/java/com/marcozanon/macaco/licensing/MLicenseManager.java +++ b/src/main/java/com/marcozanon/macaco/licensing/MLicenseManager.java @@ -38,7 +38,7 @@ public class MLicenseManager { // MJsonObject fullLicense = MLicenseManager.generateFullLicense(privateKeyPemString, licenseSkeletonJsonString); // - Files.write(fullLicenseFile, fullLicense.getJsonValue(true).getBytes(MConstants.DEFAULT_CHARSET), StandardOpenOption.CREATE); + Files.write(fullLicenseFile, fullLicense.getJsonValue(true).getBytes(MConstants.DEFAULT_CHARSET), StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING); } catch (IOException exception) { throw new MLicensingException("Could not generate full license.", exception);