Modify ↓
Ticket #120 (closed defect: invalid)
stripphpcomments currupts some .png files while using copy?
| Reported by: | bonebreaker@… | Owned by: | hans |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | phing-core | Version: | 2.2.0 |
| Keywords: | stripphpcomments | Cc: |
Description
I had a copy task working on a fileset with stripphpcomments in the filterchain.
Some .png files were corrupted in the process, I removed the filterchain from the copy task and now it all works fine. Only some .png files were corrupted (< 10%) I attached one of the .png that got corrupted by Phing so that you can try to reproduce.
Attachments
Change History
comment:1 Changed 5 years ago by hans
- Status changed from new to closed
- Resolution set to invalid
The correct way to deal with this is to make sure that *.png files are not included in the copy.
For example:
<!-- first copy everything except PHP files -->
<copy todir="${destdir}">
<fileset dir="${srcdir}">
<include name="**"/>
<exclude name="**/*.php"/>
</fileset>
</copy>
<!-- now copy only the PHP files and use a filterchain -->
<copy todir="${destdir}">
<fileset dir="${srcdir}">
<include name="**/*.php"/>
</fileset>
<filterchain>
<stripphpcomments/>
</filterchain>
</copy>
Note: See
TracTickets for help on using
tickets.


.png file corrupted by stripphpcomments