[BUG] CrLfFileStream and Exceptions [FIX]
David T. Lewis
lewis at mail.msen.com
Sun Feb 11 02:51:27 UTC 2001
On Thu, Feb 08, 2001 at 08:40:48PM +0100, Bert Freudenberg wrote:
> (CrLfFileStream newFileNamed: '...') will mutate into a FileStream if the
> file existed before, inside the exception handler. So if the file exists
> it will still put CRs in it :(
>
> Here's a check:
>
> (CrLfFileStream newFileNamed: 'bla.txt')
> cr; close.
> (FileStream oldFileNamed: 'bla.txt')
> contentsOfEntireFile asArray collect: [:c | c asciiValue].
> "first run: #(10)"
> "second run: #(13)"
>
>
> -- Bert
I posted a fix for this a little while back. A copy is at:
http://swiki.gsug.org:8080/sqfixes/1264.html
Dave
More information about the Squeak-dev
mailing list
|