Update GeneralUtils.java

This commit is contained in:
Ludy87 2025-07-30 20:54:20 +02:00
parent 7cd5d60fa4
commit adb79e202e
No known key found for this signature in database
GPG Key ID: 92696155E0220F94

View File

@ -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) {