Skip to content

Commit

Permalink
NioFiles#doCopyFileUsingNewIO does not follow symlinks (#45)
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.

This closes #46 and fixes #45
  • Loading branch information
msimacek authored and michael-o committed Jul 3, 2019
1 parent d00901b commit 0438170
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
Original file line number Diff line number Diff line change
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 0438170

Please sign in to comment.