diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BinaryPipeline.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BinaryPipeline.java index e63af2db..8e3fc539 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BinaryPipeline.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BinaryPipeline.java @@ -86,7 +86,7 @@ public void build(Path target, boolean deleteTempFiles) throws IOException { long time_task_end = System.currentTimeMillis(); long time_task = time_task_end - time_this; time_this = time_task_end; - if (isNeedDelete && deleteTempFiles) Files.deleteIfExists(oldPath); + if (isNeedDelete && deleteTempFiles && oldPath != thisPath) Files.deleteIfExists(oldPath); isNeedDelete = task.allowDelete(); logger.info("Task {} processed from {} millis", task.getName(), time_task); }