[Monodevelop-patches-list] r2603 - in trunk/MonoDevelop/Core/src/MonoDevelop.Base: . Services/File

John Luke <jluke@cfl.rr.com> jluke at mono-cvs.ximian.com
Sat Jun 18 16:04:31 EDT 2005


Author: jluke
Date: 2005-06-18 16:04:30 -0400 (Sat, 18 Jun 2005)
New Revision: 2603

Modified:
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/File/RecentFiles.cs
Log:
2005-06-15  John Luke  <john.luke at gmail.com>

        * Services/File/RecentFiles.cs: catch exception when writing to
        ~/.recently-used, fixes bug #75305



Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-06-16 18:16:16 UTC (rev 2602)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-06-18 20:04:30 UTC (rev 2603)
@@ -1,5 +1,10 @@
 2005-06-15  John Luke  <john.luke at gmail.com>
 
+	* Services/File/RecentFiles.cs: catch exception when writing to
+	~/.recently-used, fixes bug #75305
+
+2005-06-15  John Luke  <john.luke at gmail.com>
+
 	* MonoDevelopCore.addin.xml: add EditCommands.Rename to F2
 	shortcut, fixes bug# 73774
 

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/File/RecentFiles.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/File/RecentFiles.cs	2005-06-16 18:16:16 UTC (rev 2602)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/File/RecentFiles.cs	2005-06-18 20:04:30 UTC (rev 2603)
@@ -328,10 +328,15 @@
 
 			// if we specifically set Encoding UTF 8 here it writes the BOM
 			// which confuses others (egg-recent-files) I guess
-			XmlTextWriter writer = new XmlTextWriter (new StreamWriter (RecentFileStore));
-			writer.Formatting = Formatting.Indented;
-			serializer.Serialize (writer, this);
-			writer.Close ();
+			try {
+				XmlTextWriter writer = new XmlTextWriter (new StreamWriter (RecentFileStore));
+				writer.Formatting = Formatting.Indented;
+				serializer.Serialize (writer, this);
+				writer.Close ();
+			}
+			catch {
+				Console.WriteLine ("WARNING: cannot write to ~/.recently-used");
+			}
 			EmitChangedEvent ();
 
 			// back to normal




More information about the Monodevelop-patches-list mailing list