1
0
forked from VimPlug/jedi

Fixed Windows slashes problem.

This commit is contained in:
bstaint
2016-08-01 01:13:39 +08:00
parent 6f598b1157
commit b31b456dd4
3 changed files with 14 additions and 1 deletions
+5 -1
View File
@@ -339,7 +339,11 @@ def dotted_from_fs_path(fs_path, sys_path):
for s in sys_path:
if (fs_path.startswith(s) and len(path) < len(s)):
path = s
return _path_re.sub('', fs_path[len(path):].lstrip(os.path.sep)).replace(os.path.sep, '.')
# - Window
# X:\path\to\lib-dynload/datetime.pyd => datetime
module_path = fs_path[len(path):].lstrip(os.path.sep).lstrip('/')
return _path_re.sub('', module_path).replace(os.path.sep, '.')
def load_module(evaluator, path=None, name=None):