[Monodevelop-patches-list] r1769 - in trunk/MonoDevelop/src/Main/Base: . Gui/Dialogs

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Wed Jun 16 22:46:15 EDT 2004


Author: jluke
Date: 2004-06-16 22:46:15 -0400 (Wed, 16 Jun 2004)
New Revision: 1769

Modified:
   trunk/MonoDevelop/src/Main/Base/ChangeLog
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs
Log:
fix 60001, creating directory without permission, etc.


Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-06-16 17:35:44 UTC (rev 1768)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-06-17 02:46:15 UTC (rev 1769)
@@ -1,3 +1,10 @@
+2004-06-16  John Luke  <jluke at cfl.rr.com>
+
+	* Gui/Dialogs/NewProjectDialog.cs: guard against unauthorized
+	exception when creating the project directory, and display an error
+	message and allow the user to fix it.
+	fixes bug # 60001
+
 2004-06-13  Todd Berman  <tberman at sevenl.net>
 
 	* Internal/Project/Project/Deployment/ScriptDeploy.cs: string fix

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs	2004-06-16 17:35:44 UTC (rev 1768)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/NewProjectDialog.cs	2004-06-17 02:46:15 UTC (rev 1769)
@@ -233,9 +233,16 @@
 			if (TemplateView.CurrentlySelected != null && name.Length != 0) {
 					ProjectTemplate item = (ProjectTemplate) TemplateView.CurrentlySelected;
 					
-					System.IO.Directory.CreateDirectory (ProjectSolution);
+					try
+					{
+						System.IO.Directory.CreateDirectory (ProjectSolution);
+					}
+					catch (UnauthorizedAccessException accessException)
+					{
+						messageService.ShowError (String.Format (GettextCatalog.GetString ("You do not have permission to create to {0}"), ProjectSolution));
+						return;
+					}
 					
-					
 					ProjectCreateInformation cinfo = new ProjectCreateInformation ();
 					
 					cinfo.CombinePath     = ProjectLocation;




More information about the Monodevelop-patches-list mailing list