ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave <davidcor...@gmail.com>
Subject Re: Delete task should be failing for UNC path that does not exist
Date Thu, 26 Feb 2009 18:01:22 GMT
It doesn't fail when the directory exists or does not exist.
However, when the directory does exist, it is not deleted.
It should either succeed and deleted the directory, or fail if it can't
delete the directory or the directory does not exist.
However, it's succeeding for all cases.

On Thu, Feb 26, 2009 at 5:56 PM, David Weintraub <qazwart@gmail.com> wrote:

> 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
>
>


-- 
"A lot of people are afraid of heights. Not me, I'm afraid of widths."

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message