Skip to content

Commit 701bb94

Browse files
committed
Preventing dir creation failure if the output dir already exists (RC). Fixes issue 6704
1 parent 814e5ab commit 701bb94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/server/src/org/openqa/selenium/server/SeleniumServer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,8 @@ protected void runHtmlSuite() {
624624
HTMLLauncher launcher = new HTMLLauncher(this);
625625
String resultFilePath = getRequiredSystemProperty("htmlSuite.resultFilePath");
626626
File resultFile = new File(resultFilePath);
627-
if (! resultFile.getParentFile().mkdirs()) {
627+
File resultDir = resultFile.getParentFile();
628+
if (!resultDir.exists() && !resultDir.mkdirs()) {
628629
RemoteControlLauncher.usage("can't create directory for result file " + resultFilePath);
629630
System.exit(1);
630631
}

0 commit comments

Comments
 (0)