Commits

Anonymous committed daee9fa

project: fix _realpath on cygwin

Comments (0)

Files changed (1)

rope/base/project.py

 import cPickle as pickle
 import os
 import shutil
+import sys
 import warnings
 
 import rope.base.fscommands
     Is equivalent to ``realpath(abspath(expanduser(path)))``.
 
     """
+    # there is a bug in cygwin for os.path.abspath() for abs paths
+    if sys.platform == 'cygwin':
+        if path.startswith('/') or path[1:2] == ':':
+            return path
+        return os.path.abspath(os.path.expanduser(path))
     return os.path.realpath(os.path.abspath(os.path.expanduser(path)))