From 0438170588606aa535fe670731c9525a79b00645 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Wed, 11 Jul 2018 13:15:55 +0200 Subject: [PATCH] NioFiles#doCopyFileUsingNewIO does not follow symlinks (#45) Make copying using NIO and legacy IO consistent with respect to following symlinks in source. This closes #46 and fixes #45 --- src/main/java/org/codehaus/plexus/util/NioFiles.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/codehaus/plexus/util/NioFiles.java b/src/main/java/org/codehaus/plexus/util/NioFiles.java index 2841978d..50cdeb72 100644 --- a/src/main/java/org/codehaus/plexus/util/NioFiles.java +++ b/src/main/java/org/codehaus/plexus/util/NioFiles.java @@ -138,7 +138,7 @@ public static File copy( File source, File target ) throws IOException { Path copy = Files.copy( source.toPath(), target.toPath(), StandardCopyOption.REPLACE_EXISTING, - StandardCopyOption.COPY_ATTRIBUTES, LinkOption.NOFOLLOW_LINKS ); + StandardCopyOption.COPY_ATTRIBUTES ); return copy.toFile(); }