mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-16 13:47:28 +02:00
Update app/common/src/main/java/stirling/software/common/util/GeneralUtils.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
fef607ec4a
commit
98f7f153f6
@ -544,8 +544,14 @@ public class GeneralUtils {
|
||||
log.warn("Atomic move not supported, falling back to non-atomic move for {}", target, e);
|
||||
Files.move(tmp, target, StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
} catch (FileAlreadyExistsException e) {
|
||||
log.debug("File already exists at {}", target);
|
||||
} 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);
|
||||
}
|
||||
try {
|
||||
Files.deleteIfExists(tmp);
|
||||
} catch (IOException ex) {
|
||||
|
Loading…
Reference in New Issue
Block a user