This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-io.git
commit 12a19412a7373b5415bd1f9d79dc4334c29434b3 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Jun 2 13:37:25 2023 -0400 [IO-798] DeferredFileOutputStream throws exception when system temp dir is a symlink --- src/changes/changes.xml | 3 +++ .../java/org/apache/commons/io/output/DeferredFileOutputStream.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 645c5cd8..5826c514 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -67,6 +67,9 @@ The <action> type attribute can be add,update,fix,remove. <action dev="ggregory" type="fix" due-to="Gary Gregory"> Only read the relevant portion of a file in AbstractOrigin.PathOrigin.getByteArray(long, int) </action> + <action dev="ggregory" type="fix" due-to="Shai Shapira, Gary Gregory" issue="IO-798"> + DeferredFileOutputStream throws exception when system temp dir is a symlink. + </action> <!-- ADD --> <action dev="ggregory" type="add" due-to="Gary Gregory"> Add CharSequenceInputStream.Builder. diff --git a/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java b/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java index 66a3cabf..78bc4b9c 100644 --- a/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java +++ b/src/main/java/org/apache/commons/io/output/DeferredFileOutputStream.java @@ -342,7 +342,7 @@ public class DeferredFileOutputStream extends ThresholdingOutputStream { if (prefix != null) { outputPath = Files.createTempFile(directory, prefix, suffix); } - PathUtils.createParentDirectories(outputPath); + PathUtils.createParentDirectories(outputPath, null, PathUtils.EMPTY_FILE_ATTRIBUTE_ARRAY); final OutputStream fos = Files.newOutputStream(outputPath); try { memoryOutputStream.writeTo(fos);