IMHO. I don't think it is a matter of whether the second mkdir "completed"
or not here. As Jan said, mkdir has the responsibility to make sure the
directory exists when it ends. In the case of the first mkdir, the directory
had to be created so mkdir said it did it. In the case of the second mkdir,
the directory was already there so mkdir had nothing to do so it said
nothing. In both cases mkdir "completed" its responsibility successfully.

This is essentially what I would expect to see. It would probably be better
if the -d output said that the directory was already there and the create
was skipped but I would not want that much info in the standard message.

Bill

-----Original Message-----
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 16, 2006 6:23 AM
To: Ant Users List
Subject: Re: test for directory existence


If I understand correctly The objective (in this case the directory) was
created by the first mkdir task but the 2nd mkdir task did not complete its
task as the condition that the folder had already existed even though the
2nd mkdir task would be doing the same thing as the first task essentially
the 2nd mkdir did not complete?

Is this correct ?

Diky/Vielen Danke,
Martin-

----- Original Message -----
From: "Ondřej Světlík" <[EMAIL PROTECTED]>
To: "Ant Users List" <user@ant.apache.org>
Sent: Thursday, February 16, 2006 8:31 AM
Subject: Re: test for directory existence


>> Stefan-
>> I guess Im confused
>> why doesnt mkdir show 2 success messages instead of the just the first
>> success message?
>> Martin-
>> ----- Original Message -----
>> From: "Stefan Bodewig" <[EMAIL PROTECTED]>
>> To: <user@ant.apache.org>
>> Sent: Thursday, February 16, 2006 12:18 AM
>> Subject: Re: test for directory existence
>>
>>
>>> On Wed, 15 Feb 2006, Martin Gainty <[EMAIL PROTECTED]> wrote:
>>>
>>>> *Not sure about delete*
>>>
>>> it will fail if you tell it to delete something that isn't there -
>>> unless you set the quite attribute to true in which case it will
>>> simply do nothing.
>>>
>>>> but I know mkdir will fail if the folder is already in place
>>>
>>> No it won't.
>>>
>>> ,----
>>> | <project>
>>> |   <mkdir dir="foo"/>
>>> |   <mkdir dir="foo"/>
>>> | </project>
>>> `----
>>>
>>> leads to
>>>
>>> ,----
>>> |     [mkdir] Created dir: /tmp/foo
>>> |
>>> | BUILD SUCCESSFUL
>>> | Total time: 1 second
>>> `----
>>>
>>> The task doesn't even issue a warning message.
>>>
>>> Stefan
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
> 
> <mkdir> as well as <delete> prints a message only in case it creates or
> deletes something. When there's nothing to create (the directory already
> exists) or delete (there's no such directory) it prints no message. You
> may try do run ant with parameter -d to see more output.
> 
> Best regards
> 
> Ondrej Svetlik
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to