Skip to content

Commit b1f5883

Browse files
authored
Fix #2770: FileAlreadyExistsException on copy (#2827)
* Fix #2770: FileAlreadyExistsException on copy
1 parent b484be1 commit b1f5883

File tree

1 file changed

+2
-1
lines changed
  • testng-core/src/main/java/org/testng/reporters/jq

1 file changed

+2
-1
lines changed

testng-core/src/main/java/org/testng/reporters/jq/Main.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ public void generateReport(
9292
}
9393
File fileToCopy = new File(outputDirectory, fileName);
9494
fileToCopy.getParentFile().mkdirs();
95-
java.nio.file.Files.copy(is, fileToCopy.toPath());
95+
java.nio.file.Files.copy(
96+
is, fileToCopy.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING);
9697
}
9798
}
9899
all = Files.readFile(header);

0 commit comments

Comments
 (0)