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 50115] ZIP emits wrong message and creates corrupt archive when resource collections used
Date Thu, 28 Oct 2010 03:56:00 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50115

Isaac Shabtay <isaac@shabtay.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #2 from Isaac Shabtay <isaac@shabtay.com> 2010-10-27 23:55:57 EDT ---
Sorry for the unclear description before. Here's a more detailed explanation:

1) Create directory D:/temp (or whatever, up to you, I'll use D:/temp in this
text)

2) Create a file named D:/temp/test1.txt with some text in it.

3) Create a directory named D:/temp/test2 with nothing in it.

4) Execute both "demo-good" and "demo-bad" in this antfile:

<?xml version="1.0" encoding="UTF-8"?>
<project name="bug">
   <target name="demo-good">
      <zip destfile="D:/temp/good.zip" whenempty="skip">
         <fileset dir="D:/temp" includes="test**"/>
      </zip>
   </target>
   <target name="demo-bad">
      <zip destfile="D:/temp/bad.zip" whenempty="skip">
         <resources>
            <fileset dir="D:/temp" includes="test**"/>
         </resources>
      </zip>
   </target>
</project>


When executing "demo-good", you'll get a "good.zip" file containing the file
"test1.txt" and a directory called "test2".

When executing "demo-bad", you'll get a warning message from Ant, saying that
the archive has been skipped; however, the archive itself *is* created. Its
contents are wrong, though; the directory "test2" will not exist there.

I had another testcase a while ago that showed a corrupt archive but I can't
find it anywhere. Nevertheless, "demo-bad" will demonstrate the problem I
believe.

-- 
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