[Monodevelop-patches-list] r2418 - in trunk/MonoDevelop: Core/src/MonoDevelop.Base Core/src/MonoDevelop.Base/Commands contrib
Christian Hergert <chris@mosaix.net>
chergert at mono-cvs.ximian.com
Sat Apr 2 06:04:24 EST 2005
Author: chergert
Date: 2005-04-02 06:04:24 -0500 (Sat, 02 Apr 2005)
New Revision: 2418
Modified:
trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/FileCommands.cs
trunk/MonoDevelop/contrib/
Log:
Core/src/MonoDevelop.Base/Commands/FileCommands.cs: Ask if we should overwrite
before actually doing it. Patch from Andrew Weller.
contrib: Add some ignores
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-04-02 06:26:42 UTC (rev 2417)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-04-02 11:04:24 UTC (rev 2418)
@@ -1,5 +1,10 @@
2005-04-01 Christian Hergert <christian.hergert at gmail.com>
+ * Commands/FileCommands.cs: Add Andrew's patch to ask if we want to
+ overwrite an existing file before actually doing it.
+
+2005-04-01 Christian Hergert <christian.hergert at gmail.com>
+
* Services/ILoggingService.cs: Update the LogAppendedArgs and remove the
category.
* Services/DefaultLoggingService.cs: Remove the need for the StackTrace.
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/FileCommands.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/FileCommands.cs 2005-04-02 06:26:42 UTC (rev 2417)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Commands/FileCommands.cs 2005-04-02 11:04:24 UTC (rev 2418)
@@ -167,7 +167,12 @@
Runtime.MessageService.ShowMessage(String.Format (GettextCatalog.GetString ("File name {0} is invalid"), filename));
return;
}
-
+ // detect preexisting file
+ if(File.Exists(filename)){
+ if(!Runtime.MessageService.AskQuestion(String.Format (GettextCatalog.GetString ("File {0} already exists. Overwrite?"), filename))){
+ return;
+ }
+ }
// save backup first
if((bool) Runtime.Properties.GetProperty ("SharpDevelop.CreateBackupCopy", false)) {
Runtime.FileUtilityService.ObservedSave (new NamedFileOperationDelegate(window.ViewContent.Save), filename + "~");
Property changes on: trunk/MonoDevelop/contrib
___________________________________________________________________
Name: svn:ignore
+ Makefile.in
Makefile
More information about the Monodevelop-patches-list
mailing list