ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew van Renen" <avanre...@hotmail.com>
Subject case inconsistencies on Windows file names
Date Fri, 30 Aug 2002 11:06:23 GMT

I ran into an inconsistency with the way case in file names is handled.  I 
had a file with an uppercase suffix (foo.XML), but in my build file I 
refered to it as foo.xml.

I used zip to back it up, and then delete to remove it.  The zip task could 
not find it, but the delete/available tasks did (not an ideal combination, 
as you can imagine).

What is the rule for case handling in Ant on Windows, and which of the 2 
tasks is in error?

(The code looked like:
    <available property="to.exists" file="${to}" type="file"/>
    <antcall target="backup_file"/>
    <delete file="${to}" quiet="true"/>
    .
    .
    <target name="backup_file" if="to.exists">
        <dirname property="to.path" file="${to}"/>
        <basename property="to.filename" file="${to}"/>
        <zip destfile="${backup_zip}" update="true" whenempty="create">
            <fileset dir="${to.path}" includes="${to.filename}"/>
        </zip>
    .
    .)

Andrew


_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message