ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: Delete task should be failing for UNC path that does not exist
Date Thu, 26 Feb 2009 17:56:35 GMT
Does it fail when the directory does exist?

Try printing out "out.parent.dir" and see what it is equal to:

<echo message="out.parent.dir = &quot;${out.parent.dir}&quot;"/>

Maybe the backslashes are being misinterpreted somehow.

Another possibility has to do with the way UNC paths work. Ant may not
be playing so friendly with them. It could be that Ant is receiving
the message that the path exists before it tries a delete, but then
when it tries a delete, it gets the deletion failed message. I am not
a Windows developer, so I can't say for certain what is going on.

You might want to try the <available> command to test for the
directory before doing the delete as a workaround.


On Thu, Feb 26, 2009 at 12:28 PM, Dave <davidcorley@gmail.com> wrote:
> The following reduced test case shows the problem. I've tested this with Ant
> 1.7.1 and JDK 1.4.2_19
> =======================
> <project name="delete-UNC-test">
>    <property name="out.parent.dir"
> value="\\my-unc-path-that-does-not-exist\tmp"/>
>    <delete dir="${out.parent.dir}" verbose="true"/>
> </project>
> =======================
>
> Can anyone help me with this?
>
> --
> "A lot of people are afraid of heights. Not me, I'm afraid of widths."
>



-- 
--
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message