Skip to content

Commit 0438170

Browse files
msimacekmichael-o
authored andcommitted
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
1 parent d00901b commit 0438170

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/codehaus/plexus/util/NioFiles.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public static File copy( File source, File target )
138138
throws IOException
139139
{
140140
Path copy = Files.copy( source.toPath(), target.toPath(), StandardCopyOption.REPLACE_EXISTING,
141-
StandardCopyOption.COPY_ATTRIBUTES, LinkOption.NOFOLLOW_LINKS );
141+
StandardCopyOption.COPY_ATTRIBUTES );
142142
return copy.toFile();
143143
}
144144

0 commit comments

Comments
 (0)