ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49137] Ant Symlink task generates Null Pointer exception with stack trace when trying to delete symlink
Date Fri, 16 Apr 2010 20:05:12 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49137

Stefan Bodewig <bodewig@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.8.1

--- Comment #1 from Stefan Bodewig <bodewig@apache.org> 2010-04-16 16:05:09 EDT ---
Apparently, if you create a File instance using new File("name") and ./name
is a symbolic link then this file's getParent() returns null.

If you create new File(new File("."), "name") you get the current directory as
parent.  Learn something new every day.

As a workaround for your case, use link="./Templates" and the delete succeeds.

Fixed in svn revision 935064

Realized that link is not resolved against basedir but against the current
working directory and didn't dare to change that for backwards compatibility -
will document that.

Many thanks for the testcase.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message