Github user jaikiran commented on a diff in the pull request:

    https://github.com/apache/ant/pull/49#discussion_r155941155
  
    --- Diff: src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java 
---
    @@ -500,18 +502,12 @@ private void doLink(String res, String lnk) throws 
BuildException {
                 File dir = fs.getDir(getProject());
     
                 Stream.of(ds.getIncludedFiles(), ds.getIncludedDirectories())
    -                .flatMap(Stream::of).forEach(path -> {
    -                    try {
    -                        File f = new File(dir, path);
    -                        File pf = f.getParentFile();
    -                        String name = f.getName();
    -                        if (SYMLINK_UTILS.isSymbolicLink(pf, name)) {
    -                            result.add(new File(pf.getCanonicalFile(), 
name));
    -                        }
    -                    } catch (IOException e) {
    -                        handleError("IOException: " + path + " omitted");
    +                    .flatMap(Stream::of).forEach(path -> {
    +                    final File f = new File(dir, path);
    +                    if (Files.isSymbolicLink(f.toPath())) {
    +                        result.add(f);
    --- End diff --
    
    When I initially changed this part, while submitting the PR, I had thought 
about it a bit whether or not to stick with the previous behaviour. Given that 
it was noted as a "limitation" (in the javadoc), I had decided to change the 
behaviour. But thinking about it again, I do agree with you that it isn't worth 
changing the previous behaviour (without knowing the complete impact). So I 
have switched back to the previous semantic, in this part of the code and 
updated the PR


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to