DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18476>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18476 copy with filtering modifies lineendings Summary: copy with filtering modifies lineendings Product: Ant Version: 1.6Alpha (nightly) Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Core AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When copy is used with filtering, the line endings get modified from the line endings in the file to the native line endings. Also, if a file does not end with a line ending, one is added by the task. This behaviour is tested by unit test: .testcases/org.apache.tools.ant.taskdefs#testFilterChain. I can (sort of) understand the reason when using filter sets, also this behaviour has been present since filterchains were added in 2001, so it should not be changed for filter sets. However for filter chains (and for different encodings), I think that the code should retain the line endings. I am included a patch to do this, tested locally but not with the different encodings. To do the same for filtersets would involve coping the algorithm from taskdefs.optional.ReplaceRegExp.