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

             Bug #: 51462
           Summary: sync does not work with zipfileset
           Product: Ant
           Version: 1.8.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


I was happy to see that "sync" supports the "zipfileset" because I need to sync
a destination folder with the contents of a source .jar/.zip file.

I cannot just unzip the contents of the .jar/.zip file because dangling files
that were removed in the .zip file would still be present in the target
directory.
So, I really need a sync here.

Now, I have the following simple target:

<target name="test">
    <sync todir="dir">
        <zipfileset src="test.zip" />
    </sync>
</target>

The "test.zip" is a simple zip file which has one entry. The directory "dir" is
initially empty.

Executing this target results in the entry of the zip file being copied into
"dir".
BUT: Executing the target a second time results in the copied file being
removed from "dir" and "dir" is afterwards empty!

It seems that files that exist both in the target folder and the source file
are removed from the target folder and files that only exist in the source file
are copied into the target folder...

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