mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-16 13:47:28 +02:00
Update GeneralUtils.java
This commit is contained in:
parent
7cd5d60fa4
commit
adb79e202e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user