[Monodevelop-patches-list] r2663 - in trunk/MonoDevelop/Core/src/MonoDevelop.Base: . Gui/Pads/ProjectPad
Lluis Sanchez <lluis@ximian.com>
lluis at mono-cvs.ximian.com
Mon Jul 18 07:50:06 EDT 2005
Author: lluis
Date: 2005-07-18 07:50:06 -0400 (Mon, 18 Jul 2005)
New Revision: 2663
Modified:
trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ProjectPad/FolderNodeBuilder.cs
Log:
2005-07-18 Lluis Sanchez Gual <lluis at novell.com>
* Gui/Pads/ProjectPad/FolderNodeBuilder.cs: When adding an existing
file to the project ask if it needs to be replaced.
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-07-18 11:09:05 UTC (rev 2662)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-07-18 11:50:06 UTC (rev 2663)
@@ -1,3 +1,8 @@
+2005-07-18 Lluis Sanchez Gual <lluis at novell.com>
+
+ * Gui/Pads/ProjectPad/FolderNodeBuilder.cs: When adding an existing
+ file to the project ask if it needs to be replaced.
+
2005-07-18 Lluis Sanchez Gual <lluis at novell.com>
* Internal/ProgressMonitoring/BaseProgressMonitor.cs: Store the
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ProjectPad/FolderNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ProjectPad/FolderNodeBuilder.cs 2005-07-18 11:09:05 UTC (rev 2662)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ProjectPad/FolderNodeBuilder.cs 2005-07-18 11:50:06 UTC (rev 2663)
@@ -225,8 +225,8 @@
try {
MoveCopyFile (project, CurrentNode, file, ret == 2, false);
}
- catch {
- Runtime.MessageService.ShowError (GettextCatalog.GetString ("An error occurred while attempt to move/copy that file. Please check your permissions."));
+ catch (Exception ex) {
+ Runtime.MessageService.ShowError (ex, GettextCatalog.GetString ("An error occurred while attempt to move/copy that file. Please check your permissions."));
}
}
}
@@ -249,7 +249,11 @@
string newfilename = alreadyInPlace ? filename : Path.Combine (baseDirectory, name);
if (filename != newfilename) {
- File.Copy (filename, newfilename);
+ if (File.Exists (newfilename)) {
+ if (!Runtime.MessageService.AskQuestion (string.Format (GettextCatalog.GetString ("The file '{0}' already exists. Do you want to replace it?"), newfilename), "MonoDevelop"))
+ return;
+ }
+ File.Copy (filename, newfilename, true);
if (move)
Runtime.FileService.RemoveFile (filename);
}
More information about the Monodevelop-patches-list
mailing list