stoerr commented on a change in pull request #142:
URL:
https://github.com/apache/jackrabbit-filevault/pull/142#discussion_r642307887
##########
File path:
vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/registry/impl/FSInstallState.java
##########
@@ -302,7 +302,7 @@ private static WorkspaceFilter readWorkspaceFilter(Element
child) throws Configu
*/
public void save(Path file) throws IOException {
Files.createDirectories(file.getParent());
- try (OutputStream out = Files.newOutputStream(file,
StandardOpenOption.CREATE)) {
+ try (OutputStream out = Files.newOutputStream(file,
StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING)) {
Review comment:
Ah, indeed, thanks. Changed that. I'm wondering whether the alternative
approach
https://github.com/stoerr/jackrabbit-filevault/commit/916c7d0238435d8843ea506c95a87e70dc2bc6c8
would be a little better, though.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]