ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Fesler" <eric.fes...@hubmethods.com>
Subject RE: extra CRLF when copying file with filtering
Date Fri, 29 Nov 2002 08:46:45 GMT
"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:bodewig@apache.org] 
Sent: jeudi 28 novembre 2002 17:02
To: ant-user@jakarta.apache.org
Subject: Re: extra CRLF when copying file with filtering


On Thu, 28 Nov 2002, Eric Fesler <eric.fesler@hubmethods.com> 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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message