Fixed an issue causing wrong project file entries if the project is generated in the root on windows.

Fri, 30 Oct 2015 18:01:42 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 30 Oct 2015 18:01:42 +0100
changeset 4518
fd7d34bd1a88
parent 4517
2ccc07f06607
child 4519
55186d362145

Fixed an issue causing wrong project file entries if the project is generated in the root on windows.
(grafted from b893c71f6f66540fad62ae1f5d72cb641ba2f943)

Project/Project.py file | annotate | diff | comparison | revisions
--- a/Project/Project.py	Sat Oct 31 13:15:24 2015 +0100
+++ b/Project/Project.py	Fri Oct 30 18:01:42 2015 +0100
@@ -3258,7 +3258,10 @@
             if self.ppath and path == self.ppath:
                 return ""
             else:
-                return path[len(self.ppath) + 1:]
+                relpath = path[len(self.ppath):]
+                if relpath.startswith(("/", "\\")):
+                    relpath = relpath[1:]
+                return relpath
         else:
             return path
         

eric ide

mercurial