diff options
author | Dick Porter <dick@acm.org> | 2004-08-18 17:54:00 +0400 |
---|---|---|
committer | Dick Porter <dick@acm.org> | 2004-08-18 17:54:00 +0400 |
commit | 4b6ee1cb367c6eb07fc2509f9dc9b0723c93e7ee (patch) | |
tree | 228b2f3fce9f7565449e3959628e3f5931b676e4 /mcs | |
parent | eda1a34ec69bb8040ca2c9ff0f6b9422b933d5ba (diff) |
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).
svn path=/branches/mono-1-0/mcs/; revision=32487
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/corlib/System.IO/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/corlib/System.IO/StreamWriter.cs | 16 |
2 files changed, 15 insertions, 6 deletions
diff --git a/mcs/class/corlib/System.IO/ChangeLog b/mcs/class/corlib/System.IO/ChangeLog index 19a9b7a3b59..75d3b48b95b 100644 --- a/mcs/class/corlib/System.IO/ChangeLog +++ b/mcs/class/corlib/System.IO/ChangeLog @@ -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 diff --git a/mcs/class/corlib/System.IO/StreamWriter.cs b/mcs/class/corlib/System.IO/StreamWriter.cs index 117ab7f5d60..96ac1380984 100644 --- a/mcs/class/corlib/System.IO/StreamWriter.cs +++ b/mcs/class/corlib/System.IO/StreamWriter.cs @@ -137,12 +137,16 @@ namespace System.IO { get {
return iflush;
}
- set {
- if (DisposedAlready)
- throw new ObjectDisposedException("StreamWriter");
- iflush = value;
- }
- }
+ set { + if (DisposedAlready) + throw new ObjectDisposedException("StreamWriter"); + iflush = value; + + if (iflush) { + Flush (); + } + } + } public virtual Stream BaseStream {
get {
|