ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49596] New: preceding / modifies fileset result
Date Thu, 15 Jul 2010 12:48:11 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49596

           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
        AssignedTo: notifications@ant.apache.org
        ReportedBy: vlad.balan@gmail.com


Hello,

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" />
    </patternset>

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

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

</project>

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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message