"It adds a newline if there hasn't been one. If the original file ends in a newline, everything is fine. Correct?"
Yes that's true. "This would strip a newline character from the last line if there is one." Oops! You're right. So there is no trivial solution except rewrting a new readline method that will allow an exact copy. --Eric -----Original Message----- From: Stefan Bodewig [mailto:[EMAIL PROTECTED]] Sent: jeudi 28 novembre 2002 17:02 To: [EMAIL PROTECTED] Subject: Re: extra CRLF when copying file with filtering On Thu, 28 Nov 2002, Eric Fesler <[EMAIL PROTECTED]> wrote: > Using ant 1.5, I just discover that ant is systematically adding an > extra CRLF at the end of the file when I used that copy task with > filtering set to true. Quite possible, we have similar bugs in <concat> in CVS and in <replaceregexp> for Ant 1.5.1. It adds a newline if there hasn't been one. If the original file ends in a newline, everything is fine. Correct? > BTW, here is the code as I would correct it. This would strip a newline character from the last line if there is one. Stefan -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>