Skip to content

Commit 939ae3c

Browse files
committed
Ensure directories are writable when generating reports from read-only sources
1 parent 8268c1c commit 939ae3c

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/core/src/main/java/org/apache/jmeter/report/dashboard/TemplateVisitor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ public FileVisitResult preVisitDirectory(Path file, BasicFileAttributes attrs)
9393
"{}, found non empty folder with following content {}, will be ignored",
9494
file, newDir, ex.getMessage(), newDir.toFile().listFiles());
9595
}
96+
if (!newDir.toFile().canWrite()) {
97+
newDir.toFile().setWritable(true);
98+
}
9699
return FileVisitResult.CONTINUE;
97100
}
98101

xdocs/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Summary
6767
<li><pr>6274</pr> Change references to old MySQL driver to new class <code>com.mysql.cj.jdbc.Driver</code></li>
6868
<li><issue>6352</issue> Calculate delays in Open Model Thread Group and Precise Throughput
6969
Timer relative to start of Thread Group instead of the start of the test.</li>
70+
<li><issue>6357</issue> Ensure writable directories when copying template files while report generation.</li>
7071
</ul>
7172

7273
<!-- =================== Thanks =================== -->

0 commit comments

Comments
 (0)