From adb79e202e2fa6660e15ed75df4fc3c8c25555fc Mon Sep 17 00:00:00 2001 From: Ludy87 Date: Wed, 30 Jul 2025 20:54:20 +0200 Subject: [PATCH] Update GeneralUtils.java --- .../stirling/software/common/util/GeneralUtils.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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 6fe5d37bf..53e919ecd 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,13 +553,11 @@ public class GeneralUtils { Files.move(tmp, target, StandardCopyOption.REPLACE_EXISTING); } } catch (FileSystemException e) { - if (e instanceof FileAlreadyExistsException) { - log.debug("File already exists at {}", target); - } else if (e instanceof AccessDeniedException) { - log.error("Access denied while attempting to move file to {}", target, e); - } else { - log.error("File system error occurred while moving file to {}", target, e); - } + log.debug( + "Failed to copy resource to {}: {}. Attempting to delete temporary file {}", + target, + e.getMessage(), + tmp); try { Files.deleteIfExists(tmp); } catch (IOException ex) {