Roberto Sánchez
2014-02-24 3ef2ddd5cb1ee57317ffb757aceb86355a612a17
src/patch/java/net/curisit/securis/LicenseGenerator.java
....@@ -80,7 +80,7 @@
8080 byte[] json;
8181 try {
8282 json = JsonUtils.toJSON(signedLic, true).getBytes("utf-8");
83
- Files.write(Paths.get(file.toURI()), json, StandardOpenOption.CREATE);
83
+ Files.write(Paths.get(file.toURI()), json, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
8484 } catch (UnsupportedEncodingException e) {
8585 log.error("Error creating json doc from license: " + license, e);
8686 throw new SeCurisException("Error creating json doc from license: " + license, e);