https://issues.apache.org/bugzilla/show_bug.cgi?id=50295

           Summary: Files on HFS+ partition don't appear in FileSet
           Product: Ant
           Version: 1.8.1
          Platform: Macintosh
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=26314)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26314)
Bug fix

I'm running Ubuntu 10.10 on a MacBook Pro with a shared HFS+ partition (so I
can see files under both OS X and Ubuntu).  When I try to use FileSets pointing
to files on the HFS+ partition, the sets appear empty.  For example:

<project name="ant-bug" default="test">
  <property name="dir" value="."/> <!-- default to "." -->
  <target name="test">
    <fileset id="files" dir="${dir}" includes="*"/>
    <property name="filenames" refid="files"/>
    <echo message="Files in ${dir}: ${filenames}"/>
  </target>
</project>

If this script appears in build.xml in the current directory, its output
depends on whether the current directory is on the HFS+ partition or the system
ext4 partition.

I found another user observing this problem in a mailing list post, but without
any resolution:
<http://mail-archives.apache.org/mod_mbox/ant-user/200908.mbox/%3c1250181030.8090.27.ca...@iggy%3e>

I've tracked the problem to a bug in the java.io.File API as implemented by
OpenJDK.  Rather than returning "null" from File.list(), it returns an empty
array.  I've submitted a bug report to OpenJDK.

In the mean time (and for backwards compatibility with broken JDKs), the
attached simple patch will prevent the bug from having an impact on Ant users.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to