2004-08-18 Dick Porter <dick@ximian.com>
authorDick Porter <dick@acm.org>
Wed, 18 Aug 2004 13:53:30 +0000 (13:53 -0000)
committerDick Porter <dick@acm.org>
Wed, 18 Aug 2004 13:53:30 +0000 (13:53 -0000)
* StreamWriter.cs: Flush the buffer if AutoFlush is set to true.
Fixes bug 63063, patch by Laurent Debacker (debackerl@yahoo.com).

svn path=/trunk/mcs/; revision=32486

mcs/class/corlib/System.IO/ChangeLog
mcs/class/corlib/System.IO/StreamWriter.cs

index 19a9b7a3b59bd5d6944b8a841413642d1b285a38..75d3b48b95b56fd26239b0085b70f3843c15b942 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-18  Dick Porter  <dick@ximian.com>
+
+       * StreamWriter.cs: Flush the buffer if AutoFlush is set to true.
+       Fixes bug 63063, patch by Laurent Debacker (debackerl@yahoo.com).
+
 2004-08-13  Dick Porter  <dick@ximian.com>
 
        * StreamWriter.cs: Allow FileShare.Read access to the underlying
index 117ab7f5d60d3956726125d94fccec22526b9832..96ac13809842c8a772e38c2fbf84890508c407f6 100644 (file)
@@ -137,12 +137,16 @@ namespace System.IO {
                        get {\r
                                return iflush;\r
                        }\r
-                       set {\r
-                               if (DisposedAlready)\r
-                                       throw new ObjectDisposedException("StreamWriter");\r
-                               iflush = value;\r
-                       }\r
-               }\r
+                       set {
+                               if (DisposedAlready)
+                                       throw new ObjectDisposedException("StreamWriter");
+                               iflush = value;
+
+                               if (iflush) {
+                                       Flush ();
+                               }
+                       }
+               }
 \r
                public virtual Stream BaseStream {\r
                        get {\r