controls/FolderTree.py
changeset 1758 845ca626db09
parent 1754 63f4af6bf6d9
child 1766 c1e5b9f19483
equal deleted inserted replaced
1757:0de89da92ee0 1758:845ca626db09
   213             if new_filepath != old_filepath:
   213             if new_filepath != old_filepath:
   214                 if not os.path.exists(new_filepath):
   214                 if not os.path.exists(new_filepath):
   215                     os.rename(old_filepath, new_filepath)
   215                     os.rename(old_filepath, new_filepath)
   216                     event.Skip()
   216                     event.Skip()
   217                 else:
   217                 else:
   218                     message =  wx.MessageDialog(self,
   218                     message = wx.MessageDialog(self,
   219                         _("File '%s' already exists!") % new_name,
   219                         _("File '%s' already exists!") % new_name,
   220                         _("Error"), wx.OK | wx.ICON_ERROR)
   220                         _("Error"), wx.OK | wx.ICON_ERROR)
   221                     message.ShowModal()
   221                     message.ShowModal()
   222                     message.Destroy()
   222                     message.Destroy()
   223                     event.Veto()
   223                     event.Veto()