Author: kostat
Date: 2007-05-15 11:03:30 -0400 (Tue, 15 May 2007)
New Revision: 77416

Modified:
   trunk/mcs/class/System.Data/System.Data/ChangeLog
   trunk/mcs/class/System.Data/System.Data/DataTable.cs
Log:
ensure the file is closed in DataTable.WriteXml(filename)

Modified: trunk/mcs/class/System.Data/System.Data/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data/ChangeLog   2007-05-15 14:58:27 UTC 
(rev 77415)
+++ trunk/mcs/class/System.Data/System.Data/ChangeLog   2007-05-15 15:03:30 UTC 
(rev 77416)
@@ -1,3 +1,7 @@
+2007-05-07  Konstantin Triger <[EMAIL PROTECTED]>
+
+       * DataTable.cs: ensure the file is closed in 
DataTable.WriteXml(filename).
+
 2007-05-07  Adar Wesley <[EMAIL PROTECTED]>
 
        * ConstraintCollection.cs: added CopyTo method with strongly typed 
Constraint[] 

Modified: trunk/mcs/class/System.Data/System.Data/DataTable.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data/DataTable.cs        2007-05-15 
14:58:27 UTC (rev 77415)
+++ trunk/mcs/class/System.Data/System.Data/DataTable.cs        2007-05-15 
15:03:30 UTC (rev 77416)
@@ -2462,9 +2462,15 @@
 #if NET_2_0
                private XmlWriterSettings GetWriterSettings ()
                {
+                       return GetWriterSettings (false);
+               }
+
+               private XmlWriterSettings GetWriterSettings (bool closeOutput)
+               {
                        XmlWriterSettings s = new XmlWriterSettings ();
                        s.Indent = true;
                        s.OmitXmlDeclaration = true;
+                       s.CloseOutput = closeOutput;
                        return s;
                }
 
@@ -2537,7 +2543,7 @@
                {
                        XmlWriter xw = null;
                        try {
-                               xw = XmlWriter.Create (fileName, 
GetWriterSettings ());
+                               xw = XmlWriter.Create (fileName, 
GetWriterSettings (true));
                                WriteXml (xw, mode, writeHierarchy);
                        } finally {
                                if (xw != null)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to