ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@antbuild.com>
Subject Re: cvs commit: ant/src/testcases/org/apache/tools/ant DirectoryScannerTest.java
Date Mon, 21 Jul 2003 09:31:20 GMT
Stefan,

> after your first patch, getIncludedFiles would return the names like
> they appeared in the patterns.  I.e. if you matched **/GAMMA.XML and
> the file was gamma.xml, you'd get the uppercase version.  I think this
> may have been the original behavior as well.
>
No, the original behavior is the current behavior. The reason had to do with
the fact that scanning was always done recursively from the base directory
of the fileset, and file names were always constructed based on what was
read on the output of File.list() rather than based on the include patterns.

The current test of DirectoryScanner passes with the nightly of July 10th.

>
> On Windows, on the other hand, this simply doesn't matter.  The same
> is true (unfortunately) for a couple of other OSes with case
> insensitive filesystems like MacOS X using HFS+ or OpenVMS.  It also
> probably doesn't matter for mounted SMB shares from Windows boxes or
> *FAT* partitions mounted into your Linux/*BSD/Solaris x86 box.
>
> Your getCanonicalPath fix will not catch the situation for any OS
> other than Windows (the way it is coded right now).
Then we need to extend this getCanonicalPath to all case unsensitive
systems,
if the JRE on all these systems behaves like on Windows in the sense that
new File("parent", "SuBdIr") ==> parent/SuBdIr even if subdir is actually
written "subdir"


It will also slow
> down scanning considerably, probably to the point that your prior
> optimization gets undone.  And it would probably break in the presence
> of symbolic links if we applied it to OSes that support them.
>
> Given that, I'd rather remove the getCanonicalPath part and change the
> test cases to work with the older version like you did before.  We'll
> have to include a couple of more conditions to it, but that's all.
>
> The behavior change shouldn't be visible for case-insensitive file
> systems, IMHO.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message