ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49596] New: preceding / modifies fileset result
Date Thu, 15 Jul 2010 12:48:11 GMT

           Summary: preceding / modifies fileset result
           Product: Ant
           Version: 1.8.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Core


this is the xml file:

<?xml version="1.0" encoding="UTF-8"?>

<project name="bug-fileset">

    <property name="input_place" value="d:/kits/test" />

    <patternset id="firstFiles">
        <include name="/beta/**/*.txt" />
        <exclude name="/beta/**/*_*.txt" />

    <fileset id="input_fileSet" dir="${input_place}">
        <patternset refid="firstFiles" />

    <target name="echo">
        <echo>Content of input_fileSet: ${toString:input_fileSet}</echo>


Steps to reproduce

1. on the file system in "d:kits/test/", create some files like
"beta/beta.txt", "beta/gamma/gamma.txt", "beta/gamma/gamma_2.txt"

Results with the preceding "/" in "include":

 [echo] Content of input_fileSet: beta\beta.txt

Conclusion: the filset above (<include name="/beta/**/*.txt" />
) will LIMIT the search to the "beta" folder's direct child files, even if
there is a "**/" after it indicating to search the subdirs. If you remove the
starting slash, than it goes in beta's subdirectories, like it should:

 [echo] Content of input_fileSet: beta\beta.txt;beta\gamma\gamma.txt

This does not appear to happen for the "exclude". With or without the starting
"/" in exclude, it searches the subdirs too. I can see this because
"beta/gamma/gamma_2.txt" never shoes when the "include" searches the subdirs
(not starting with "/")

This is a bug because the starting "/" cannot have an effect on a subsequent

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message