mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-18 07:15:07 -05:00
* HACK to keep things working on Java 6
This commit is contained in:
parent
f33cf35627
commit
8f647622f0
@ -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)
|
// * 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 {
|
try {
|
||||||
java.nio.file.Files.move(source.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE);
|
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
|
// HACK to keep things working on Java 6
|
||||||
if (e.getClass().getName().contains("AtomicMoveNotSupported")) {
|
if (e.getClass().getName().contains("AtomicMoveNotSupported")) {
|
||||||
java.nio.file.Files.move(source.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
java.nio.file.Files.move(source.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||||
|
Loading…
Reference in New Issue
Block a user