Skip to content

Commit

Permalink
Follow symlinks in NioFiles.copy
Browse files Browse the repository at this point in the history
Make copying using NIO and legacy IO consistent with respect to
following symlinks in source.

Fixes: codehaus-plexus#45
  • Loading branch information
msimacek committed Jul 11, 2018
1 parent b762b99 commit 16d7825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/codehaus/plexus/util/NioFiles.java
Expand Up @@ -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();
}

Expand Down

0 comments on commit 16d7825

Please sign in to comment.