[Mono-bugs] [Bug 59151][Wis] New - FileIO Append problem

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 27 May 2004 00:01:07 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by tracy@aic.net.au.

http://bugzilla.ximian.com/show_bug.cgi?id=59151

--- shadow/59151	2004-05-27 00:01:07.000000000 -0400
+++ shadow/59151.tmp.22545	2004-05-27 00:01:07.000000000 -0400
@@ -0,0 +1,69 @@
+Bug#: 59151
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: tracy@aic.net.au               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: FileIO Append problem
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+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.
+
+
+Steps to reproduce the problem:
+This is the code I am using in my application
+
+public static bool WriteTextFile(string filePath, string content, FileMode fm)
+		{
+
+StreamWriter sw = null;
+try
+{
+	FileStream fs = new FileStream(filePath, fm, FileAccess.Write,
+FileShare.ReadWrite);
+	sw =  new StreamWriter(fs);
+	sw.Write(content);
+	return true;
+}
+finally
+{
+	if (sw != null)
+	{
+		sw.Close();
+	}
+}
+
+}
+
+Actual Results:
+
+If fm is passed in with the Value of  System.IO.FileMode.Append the file is
+over writen
+
+
+Expected Results:
+
+
+The file should be appended to
+
+How often does this happen? 
+
+Every time
+
+
+Additional Information: