Patch #1939 2007-04-02 09:20

pauliusz

Patch for Bug #10797
Download
1939-Patch_for_Bug.patch (760 bytes)
Category
Application::Bugfix
Status
Accepted
Close date
2007-04-03 04:36
Assigned to
biplab
Index: src/sdk/projectmanager.cpp
===================================================================
--- src/sdk/projectmanager.cpp    (revision 3805)
+++ src/sdk/projectmanager.cpp    (working copy)
@@ -2438,6 +2438,14 @@
 
         if(name != new_name)
         {
+            if(wxFileExists(path + new_name))
+            {
+                cbMessageBox(_("Could not rename file ") + path + new_name +
+                             _(",\nbecause file with the name you specified already exists.") +
+                             _("\nPlease specify a different file name."), _("Error renaming file"), wxICON_ERROR);
+                return;
+            }
+
             if(!wxRenameFile(path + name, path + new_name))
             {
                 wxBell();
biplab 2007-04-02 17:22

This is a wx related bug. This patch is not necessary if we move to wx 2.8.

I'll apply this patch after little modification.

biplab 2007-04-03 04:36

Applied in modified form.

Thanks for your fix.