ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cathal McGinley" <cat...@vccomputers.ie>
Subject Re: MatchingTask breaks with **/*~ pattern
Date Wed, 21 Feb 2001 21:24:51 GMT
I think I've solved my own problem

>    <delete verbose="true">
>        <fileset dir="${basedir}" includes="**/*~" />
>    </delete>

>         the task seems to get caught in an infinite loop and the JVM runs
>out of memory after about 4 minutes. Curiously, if I substitute
>includes="*/*~" the task works fine (but only deletes files in the basedir
>directory). I think, from messing about with my custom task, that the
>problem lies somewhere around the getDirectoryScanner method of FileSet. On
>the other hand, no-one else seems to be having this problem, so it's
>probably just a stupid mistake on my part.

I've figured out that there was indeed an infinite recursion, but *my*
fault.
Running under Linux, I foolishly had a reflexive soft link somewhere in my
non-code files:
    /home/time/Desktop/Home -> /home/time
and when the DirectoryScanner went piling into the Desktop directory it kept
looping around those links until it ran out of memory and died. In this
light, the above symptoms are entirely explicable.

Solution: Don't use recursive soft links under UNIX environments.
I tried excluding the "Desktop" directory but gave up messing about after
several variations didn't work. Recursive sym links are bad practice anyway.
Mea culpa!

Thanks for the zen-inspirational help

C.



Mime
View raw message