From 6798db23cf27a8e088a559119ff51634d1ed7359 Mon Sep 17 00:00:00 2001 From: Ludy Date: Wed, 30 Jul 2025 21:15:18 +0200 Subject: [PATCH] Update app/common/src/main/java/stirling/software/common/util/GeneralUtils.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../main/java/stirling/software/common/util/GeneralUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/common/src/main/java/stirling/software/common/util/GeneralUtils.java b/app/common/src/main/java/stirling/software/common/util/GeneralUtils.java index 0c2d3de76..9f8d7a7e0 100644 --- a/app/common/src/main/java/stirling/software/common/util/GeneralUtils.java +++ b/app/common/src/main/java/stirling/software/common/util/GeneralUtils.java @@ -553,7 +553,8 @@ public class GeneralUtils { Files.move(tmp, target, StandardCopyOption.REPLACE_EXISTING); } } catch (FileAlreadyExistsException e) { - log.debug("File already exists at {}", target); + log.debug("File already exists at {}, attempting to replace it.", target); + Files.move(tmp, target, StandardCopyOption.REPLACE_EXISTING); } catch (AccessDeniedException e) { log.error("Access denied while attempting to copy resource to {}", target, e); throw e;