ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <>
Subject Re: Unable to delete directory
Date Fri, 11 Jul 2003 08:50:00 GMT
The following is pure speculation, as I do
not currently use NT/Win/WinXp.

This may be related to a virus checker.

On NT one is not allowed to delete files/directories
if another process have them open. (perhaps only
ntfs filesystem).

A virus checker can be registered to be called
back when contents of a directory change (files added
or removed).

This would imply that there could be a race condition
between a virus checker and a process iterating through
a directory tree deleting files and their directories.

The fix you suggest may solve the problem (at least sometimes).

Can you apply the included patch to in the
nightly build to check if this is correct.


On Thu, 2003-07-10 at 15:30, wrote:
> Thanks Peter,
> > There was a fix recently to the jar task (by antoine) to
> > fix a very hard to find problem with the jar task
> > holding on to a file reference. I am not to sure that problem
> > relates to your problem, but you could give it a shot.
> I have not tried the nightly build, but I'm pretty sure that
> a fix to the JAR task will not solve the problem.  I have
> created a stripped down ant script that contains only the
> delete task, and this also fails when there is a large
> directory structure to be deleted.
> However, I have determined the following --
> 1. the problem only occurs when running delete on a
>    directory on an NTFS drive, runs without error
>    on a FAT32 drive.
> 2. the problem did not occur when running delete
>    on a directory that resides on a network drive:
>    mapped a network drive to a local drive letter,
>    then ran the ant script with target files
>    located on the network drive.
> 3. the problem does not occur if I run ANT with a
>    below normal task priority via:
>    start /belownormal ant
> I'm sure this is a Windows issue, but it should be
> possible to avoid it in ANT by:
> 1. recognizing the error that comes back when deleting
>    a directory
> 2. retry the error after a small delay
> Michael
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message