1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-17 23:05:03 -05:00

* HACK to keep things working on Java 6

This commit is contained in:
Reinhard Pointner 2014-02-19 18:59:37 +00:00
parent f33cf35627
commit 8f647622f0

View File

@ -55,7 +55,7 @@ public final class FileUtilities {
// * On Windows ATOMIC_MOVE allows us to rename files even if only lower/upper-case changes (without ATOMIC_MOVE the operation would be ignored)
try {
java.nio.file.Files.move(source.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE);
} catch (Exception e) {
} catch (IOException e) {
// HACK to keep things working on Java 6
if (e.getClass().getName().contains("AtomicMoveNotSupported")) {
java.nio.file.Files.move(source.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING);