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
[EMAIL PROTECTED]:~/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