You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2009/05/08 11:30:25 UTC
DO NOT REPLY [Bug 47168] New: Copy Task includeEmptyDirs default
value is wrong
https://issues.apache.org/bugzilla/show_bug.cgi?id=47168
Summary: Copy Task includeEmptyDirs default value is wrong
Product: Ant
Version: 1.7.1
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: minor
Priority: P2
Component: Core tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: martineigenbrodt@googlemail.com
The doc says the includeEmptyDirs value defaults to true.
I've tried unzipping a zip containing empty dirs using copy and the zipfileset
and needed to explicitly set includeEmptyDirs to true.
So either the implementation or the doc is wrong.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 47168] Zipfileset does not include empty
directories
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47168
--- Comment #3 from Adam Bryzak <ab...@gmail.com> 2009-07-05 02:47:09 PST ---
(In reply to comment #1)
> The reason that it fails lies in zipfileset, though. Or more exactly in
> AbstractFileSet's implementation of the iterator() method which only returns
> non-directory resources at all.
Unfortunately it's also not quite as simple as that either. Updating
ArchiveFileSet to return both file and directory entries doesn't quite work.
The copy task will still ignore the directories as they get filtered out of the
resources to copy by the SourceFileScanner in the buildMap method.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 47168] Copy Task includeEmptyDirs default value is
wrong
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47168
--- Comment #1 from Stefan Bodewig <bo...@apache.org> 2009-05-11 07:05:36 PST ---
what you see is not related to the includeemptydirs attribute at all, which
does default to true.
This test here
<target name="testIncludeEmptyDirsDefaultsToTrue"
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=47168">
<mkdir dir="${input}/foo"/>
<mkdir dir="${output}"/>
<copy todir="${output}">
<fileset dir="${input}"/>
</copy>
<au:assertFileExists file="${output}/foo"/>
</target>
passes.
If you change the target to use a zipfileset (this is what I understand from
your description)
<target name="XtestIncludeEmptyDirsAndZipfileset"
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=47168">
<mkdir dir="${input}/foo"/>
<mkdir dir="${output}/final"/>
<zip destfile="${output}/zipfile.zip">
<fileset dir="${input}"/>
</zip>
<copy todir="${output}/final">
<zipfileset src="${output}/zipfile.zip"/>
</copy>
<au:assertFileExists file="${output}/final/foo"/>
</target>
it fails.
The reason that it fails lies in zipfileset, though. Or more exactly in
AbstractFileSet's implementation of the iterator() method which only returns
non-directory resources at all.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 47168] Zipfileset does not include empty
directories
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47168
martineigenbrodt <ma...@googlemail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Copy Task includeEmptyDirs |Zipfileset does not include
|default value is wrong |empty directories
--- Comment #2 from martineigenbrodt <ma...@googlemail.com> 2009-05-12 04:46:28 PST ---
Your right. Thanks for pointing the right direction. I've changed the summary.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.