Commits

Anonymous committed 385fb79

libutils: continue when the parent folder does not exist

Comments (0)

Files changed (1)

rope/base/libutils.py

     path = rope.base.project._realpath(path)
     rel = []
     while True:
-        if os.path.samefile(root, path):
-            return '/'.join(reversed(rel))
+        try:
+            if os.path.samefile(root, path):
+                return '/'.join(reversed(rel))
+        except OSError:
+            pass
         parent = os.path.dirname(path)
         if not parent or parent == path:
             break