Ticket #276 (closed defect: invalid)
includeemptydirs for TarTask
| Reported by: | anonymous | Owned by: | mrook |
|---|---|---|---|
| Priority: | major | Milestone: | 2.4.0RC1 |
| Component: | phing-core | Version: | 2.3.1RC1 |
| Keywords: | Cc: |
Description
If you have an exclude statement like:
<exclude name=".svn/"/>
and the .svn directory is a directory with no other files or directories in the .svn is not excluded. If you, however, call the tartask with: <tar ... includeemptydirs="false">
the .svn folders are not included. First, this parameter isn't included in the documentation. I found it in the code. Why is this not mentioned in the docs?
Secondly, it appears there is a bug of some sort in this case because without setting the includeemptydirs false the .svn directory is included only when it is the only entity in the directory. If you add a file to the same directory it is excluded.
Attachments
Change History
comment:3 in reply to: ↑ 2 Changed 3 years ago by mrook
- Owner changed from hans to mrook
- Status changed from new to assigned
comment:5 Changed 2 years ago by mrook
- Status changed from assigned to closed
- Resolution set to worksforme
With this build file:
<?xml version="1.0"?>
<project name="test" default="test" basedir=".">
<target name="test">
<delete file="test.tar.gz"/>
<tar destfile="test.tar.gz" compression="gzip">
<fileset dir="test">
<include name="**/**"/>
<exclude name=".svn/**"/>
</fileset>
</tar>
</target>
</project>
and a test directory containing a single empty directory '.svn', I can't reproduce this.
comment:6 Changed 9 months ago by opi@…
can confirm the problem.
Directorty structure like:
/project /project/.svn /project/cache /project/cache/.svn
with <tar ... includeemptydirs="false"> <fileset dir="test">
<include name="/"/> <exclude name=".svn"/>
</fileset>
the cache directory is missing and with
<tar ... includeemptydirs="true"> <fileset dir="test">
<include name="/"/> <exclude name=".svn"/>
</fileset>
the cache directory have the .svn directory included.
comment:7 Changed 9 months ago by op@…
- Status changed from closed to reopened
- Resolution worksforme deleted
comment:8 Changed 8 months ago by mrook
Can you test using the latest SVN code? This was fixed, see ticket #654.
comment:10 Changed 8 months ago by mrook
- Status changed from reopened to closed
- Resolution set to invalid
Very well, closing this ticket - please re-open #654 if you encounter this after the next release.

using version 2.3.0