diff --git a/testng-core/src/main/java/org/testng/reporters/jq/Main.java b/testng-core/src/main/java/org/testng/reporters/jq/Main.java index b0bc7ba093..7c6a959bd0 100644 --- a/testng-core/src/main/java/org/testng/reporters/jq/Main.java +++ b/testng-core/src/main/java/org/testng/reporters/jq/Main.java @@ -92,7 +92,8 @@ public void generateReport( } File fileToCopy = new File(outputDirectory, fileName); fileToCopy.getParentFile().mkdirs(); - java.nio.file.Files.copy(is, fileToCopy.toPath()); + java.nio.file.Files.copy( + is, fileToCopy.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING); } } all = Files.readFile(header);