Commits

Anonymous committed 08a4620

fixed bug in translating /cygdrive and / to windows drive letter

  • Participants
  • Parent commits 63aab01
  • Branches default

Comments (0)

Files changed (1)

File rope/base/project.py

             _realpath.cygwinRoot = Popen("cygpath -m /" + path, shell=True, stdout=PIPE).stdout.read().rstrip('\n')
         if len(path) > 0:
             path = path.replace('\\', '/')
+            if (path.startswith("/cygdrive")):
+                path = path[10:11] + ":" + path[11:]
             if (path[0] == '/'):
                 path = _realpath.cygwinRoot + path
             if (path[0] == '~'):
                 path =  os.path.expanduser(path)
-            if (path.startswith("/cygdrive")):
-                path = path[10:11] + ":" + path[11:]
         #here path is always in the form of c:/foo/bar/baz, which python can handle
         return path
     return os.path.realpath(os.path.abspath(os.path.expanduser(path)))