* fix UnsupportedOperationException: Unsupported copy option Java 7 Files.move() issue
This commit is contained in:
parent
77cf37b323
commit
bbf01f4799
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue