AW: [Mono-list] File IO Append

Gonzalo Paniagua Javier gonzalo@ximian.com
Wed, 26 May 2004 19:18:41 +0200


El mié, 26-05-2004 a las 09:40, Jörg Rosenkranz escribió:
> Hello Tracy,
> 
> 	-----Ursprüngliche Nachricht----- 
> 	Von: mono-list-admin@lists.ximian.com im Auftrag von Tracy Barlow 
> 	Gesendet: Mi 26.05.2004 03:17 
> 	An: Mono-List 
> 	Cc: 
> 	Betreff: [Mono-list] File IO Append
> 	
> 	
> 
> 	I log any errors in my web application to a text file. I have noticed
> 	that under Mono 0.91 the file is no longer being appended, instead the
> 	file is being overwritten.
> 	
> 
> I recognized the same behaviour when opening a FileStream and using it
> with a StreamWriter. It works when you let the StreamWriter open the file.
> 
> Code that shows this bug:
> 
> FileStream fs = new FileStream (filename, ...);
> StreamWriter sw = new StreamWriter (fs, ...);
> 
> Workaround:
> 
> StreamWriter sw = new StreamWriter (filename, ...);

That will just hide the bug. It's better to report it in bugzilla.

-Gonzalo