Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2013-08-24 00:07:00 +0400
committerMike Krüger <mkrueger@xamarin.com>2013-08-24 00:07:00 +0400
commit7f0510e367db73322c7e4dfc7ca3f46272faade6 (patch)
treea75ed79761165bf6600d9472c5eced2c316b58c6 /main/src
parent31ba67f1a2b5dd8140f40b99bfb0476e1797a8e0 (diff)
[Ide] Moved directory already exists message into the try ... catch.
Diffstat (limited to 'main/src')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectDialog.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectDialog.cs
index c984258d2f..513ee7af69 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectDialog.cs
@@ -426,15 +426,15 @@ namespace MonoDevelop.Ide.Projects {
if (templateView.CurrentlySelected == null || name.Length == 0)
return false;
- if (Directory.Exists (ProjectLocation)) {
- var btn = MessageService.AskQuestion (GettextCatalog.GetString ("Directory {0} already exists.\nDo you want to coninue the Project creation?", ProjectLocation), AlertButton.No, AlertButton.Yes);
- if (btn != AlertButton.Yes)
- return false;
- }
-
ProjectTemplate item = (ProjectTemplate) templateView.CurrentlySelected;
try {
+ if (Directory.Exists (ProjectLocation)) {
+ var btn = MessageService.AskQuestion (GettextCatalog.GetString ("Directory {0} already exists.\nDo you want to coninue the Project creation?", ProjectLocation), AlertButton.No, AlertButton.Yes);
+ if (btn != AlertButton.Yes)
+ return false;
+ }
+
System.IO.Directory.CreateDirectory (location);
} catch (IOException) {
MessageService.ShowError (GettextCatalog.GetString ("Could not create directory {0}. File already exists.", location));