* 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
1 changed files with 1 additions and 1 deletions

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);