Author: lluis
Date: 2007-05-11 05:47:44 -0400 (Fri, 11 May 2007)
New Revision: 77221
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderService.cs
Log:
* MonoDevelop.Ide.StandardHeader/StandardHeaderService.cs: Don't crash
if the header file can't be found.
Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog 2007-05-11
09:25:37 UTC (rev 77220)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog 2007-05-11
09:47:44 UTC (rev 77221)
@@ -1,3 +1,8 @@
+2007-05-11 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * MonoDevelop.Ide.StandardHeader/StandardHeaderService.cs: Don't crash
+ if the header file can't be found.
+
2007-05-10 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Ide.Gui.Dialogs/NewProjectDialog.cs: Use modal dialogs
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderService.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderService.cs
2007-05-11 09:25:37 UTC (rev 77220)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.StandardHeader/StandardHeaderService.cs
2007-05-11 09:47:44 UTC (rev 77221)
@@ -73,7 +73,7 @@
}
public static string GetHeader (string language)
{
- if (GetComment (language) == null) {
+ if (Header == null || GetComment (language) == null) {
return "";
}
StringBuilder result = new StringBuilder ();
@@ -95,7 +95,9 @@
return;
}
PropertyService propertyService = (PropertyService)
ServiceManager.GetService (typeof (PropertyService));
- Load (Path.Combine (Path.Combine
(propertyService.DataDirectory, "options"), templateFileName));
+ string file = Path.Combine (Path.Combine
(propertyService.DataDirectory, "options"), templateFileName);
+ if (File.Exists (file))
+ Load (file);
}
#region I/O
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches