Skip to content
Permalink
Browse files

[JENKINS-42934] When you specify options you need to include CREATE o…

…r the file will not be created
  • Loading branch information
stephenc committed Mar 20, 2017
1 parent a7fc570 commit 211bb293381802f7c653c6e6cee965ab316d0fc4
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/src/main/java/hudson/util/io/RewindableFileOutputStream.java
@@ -54,7 +54,7 @@ private synchronized OutputStream current() throws IOException {
if (!closed) {
FileUtils.forceMkdir(out.getParentFile());
try {
current = Files.newOutputStream(out.toPath(), StandardOpenOption.TRUNCATE_EXISTING);
current = Files.newOutputStream(out.toPath(), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
} catch (FileNotFoundException | NoSuchFileException e) {
throw new IOException("Failed to open "+out,e);
}

0 comments on commit 211bb29

Please sign in to comment.
You can’t perform that action at this time.