ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tracy Jones" <tr...@stratalight.com>
Subject possible delete bug??
Date Wed, 31 Jan 2007 21:23:36 GMT
Hi - I have the following target that is meant to delete all files in a
directory except for the ones in a list

 

 

<target name="test" depends="depends" >

                <property name="keepfiles" value="temp a b c d"/>

                <delete quiet="false" verbose="true"
includeemptydirs="true" >

                        <fileset dir="/home/sluser/test"
excludes="${keepfiles}">

                                <include name="*/**" />

                        </fileset>

                </delete>

        </target>

 

 

The directory temp contains sym links to directory a and b

 

sluser@StrataLight:~/test$ ls -Rl

.:

total 4

drwxr-xr-x    2 sluser   sluser       1024 Jan 24 22:09 a

drwxr-xr-x    2 sluser   sluser       1024 Jan 24 22:09 b

drwxr-xr-x    2 sluser   sluser       1024 Jan 24 22:09 c

drwxr-xr-x    2 sluser   sluser       1024 Jan 24 22:09 temp

 

./a:

total 0

 

./b:

total 0

 

./c:

total 0

 

./temp:

total 0

lrwxrwxrwx    1 sluser   sluser          4 Jan 24 22:09 a -> ../a

lrwxrwxrwx    1 sluser   sluser          4 Jan 24 22:09 b -> ../b

 

Then I run my script, delete tries to delete the directory temp even
though it is contained in the exclusions.  If I do not have sym links
inside temp, this works properly.

 

test:

Setting project property: keepfiles -> temp a b c d

fileset: Setup scanner in dir /home/sluser/test with patternSet{
includes: [*/**] excludes: [temp, a, b, c, d] }

   [delete] Deleting /home/sluser/test/temp/b

 

BUILD FAILED

/var/stratalight/home/sluser/test.xml:18: Unable to delete directory
/home/sluser/test/temp/b

 

Is this a bug?  Or a feature :-)

 

Tracy

 

 

 

 


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