From b147614f499c25f4e87591377d2c7cd2e62c96a8 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 29 Oct 2022 13:20:57 +0200 Subject: [PATCH] Fix replay --- SpigotCore_Main/src/de/steamwar/sql/Replay.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/de/steamwar/sql/Replay.java b/SpigotCore_Main/src/de/steamwar/sql/Replay.java index c3bc96f..a30f098 100644 --- a/SpigotCore_Main/src/de/steamwar/sql/Replay.java +++ b/SpigotCore_Main/src/de/steamwar/sql/Replay.java @@ -27,6 +27,7 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Files; +import java.nio.file.StandardCopyOption; import java.sql.SQLException; @AllArgsConstructor @@ -43,7 +44,7 @@ public class Replay { try { file = File.createTempFile("replay", "replay"); file.deleteOnExit(); - Files.copy(rs.getBinaryStream("Replay"), file.toPath()); + Files.copy(rs.getBinaryStream("Replay"), file.toPath(), StandardCopyOption.REPLACE_EXISTING); } catch (IOException e) { throw new SQLException(e); }