git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@935064 13f79535-47bb-0310-9956-ffa450edef68master
@@ -86,6 +86,10 @@ Fixed bugs: | |||||
* <jar filesetmanifest="merge"> was broken on Windows. | * <jar filesetmanifest="merge"> was broken on Windows. | ||||
Bugzilla Report 49090 | Bugzilla Report 49090 | ||||
* <symlink> delete failed if the link attribute was a relative path | |||||
to a link inside the current directory without a leading ".". | |||||
Bugzilla Report 49137 | |||||
Other changes: | Other changes: | ||||
-------------- | -------------- | ||||
@@ -184,7 +184,9 @@ public class Symlink extends DispatchTask { | |||||
return; | return; | ||||
} | } | ||||
log("Removing symlink: " + link); | log("Removing symlink: " + link); | ||||
SYMLINK_UTILS.deleteSymbolicLink(new File(link), this); | |||||
SYMLINK_UTILS.deleteSymbolicLink(FILE_UTILS | |||||
.resolveFile(new File("."), link), | |||||
this); | |||||
} catch (FileNotFoundException fnfe) { | } catch (FileNotFoundException fnfe) { | ||||
handleError(fnfe.toString()); | handleError(fnfe.toString()); | ||||
} catch (IOException ioe) { | } catch (IOException ioe) { | ||||
@@ -92,4 +92,18 @@ | |||||
<au:assertFileDoesntExist file="${output}/link"/> | <au:assertFileDoesntExist file="${output}/link"/> | ||||
</target> | </target> | ||||
<target name="testDeleteLinkInSameDirAsBuildFile" depends="setUp" if="isUnix" | |||||
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=49137"> | |||||
<mkdir dir="${output}/Templates"/> | |||||
<mkdir dir="${output}/project1"/> | |||||
<symlink action="single" link="${output}/project1/Templates" | |||||
resource="../Templates"/> | |||||
<echo file="${output}/project1/build.xml"><![CDATA[ | |||||
<project name="project1" default="build" basedir="."> | |||||
<target name="build"> | |||||
<symlink action="delete" link="Templates"/> | |||||
</target> | |||||
</project>]]></echo> | |||||
<ant antfile="${output}/project1/build.xml"/> | |||||
</target> | |||||
</project> | </project> |