* fix UnsupportedOperationException: Unsupported copy option Java 7 Files.move() issue

This commit is contained in:
Reinhard Pointner 2013-02-12 08:08:48 +00:00
parent 77cf37b323
commit bbf01f4799
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ public final class FileUtilities {
} else {
// move file
try {
java.nio.file.Files.move(source.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);
java.nio.file.Files.move(source.toPath(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING);
} catch (LinkageError e) {
org.apache.commons.io.FileUtils.moveFile(source, destination); // use "copy and delete" as fallback if standard rename fails
}