Fixed an issue on Windows systems causing weird renaming behavior in new projects.

Tue, 08 Jun 2010 08:26:18 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 08 Jun 2010 08:26:18 +0200
changeset 331
0a5fc8298d32
parent 330
4b4f242bf3f6
child 333
fd4e4c1d0852

Fixed an issue on Windows systems causing weird renaming behavior in new projects.

Project/Project.py file | annotate | diff | comparison | revisions
--- a/Project/Project.py	Wed Jun 02 10:04:33 2010 +0200
+++ b/Project/Project.py	Tue Jun 08 08:26:18 2010 +0200
@@ -577,7 +577,7 @@
         self.pfile = os.path.abspath(fn)
         self.ppath = os.path.abspath(os.path.dirname(fn))
         if Utilities.isWindowsPlatform():
-            self.ppathRe = re.compile(re.escape(self.ppath + os.sep), re.IGNORECASE )
+            self.ppathRe = re.compile(re.escape(self.ppath + os.sep), re.IGNORECASE)
         else:
             self.ppathRe = re.compile(re.escape(self.ppath + os.sep))
         
@@ -736,7 +736,7 @@
             self.pfile = os.path.abspath(fn)
             self.ppath = os.path.abspath(os.path.dirname(fn))
             if Utilities.isWindowsPlatform():
-                self.ppathRe = re.compile(re.escape(self.ppath + os.sep), re.IGNORECASE )
+                self.ppathRe = re.compile(re.escape(self.ppath + os.sep), re.IGNORECASE)
             else:
                 self.ppathRe = re.compile(re.escape(self.ppath + os.sep))
             self.name = os.path.splitext(os.path.basename(fn))[0]
@@ -2255,6 +2255,10 @@
         if dlg.exec_() == QDialog.Accepted:
             self.closeProject()
             dlg.storeData()
+            if Utilities.isWindowsPlatform():
+                self.ppathRe = re.compile(re.escape(self.ppath + os.sep), re.IGNORECASE)
+            else:
+                self.ppathRe = re.compile(re.escape(self.ppath + os.sep))
             self.pdata["VCS"] = ['None']
             self.opened = True
             if not self.pdata["FILETYPES"]:

eric ide

mercurial