Commit cf649958 authored by Brett Cannon's avatar Brett Cannon

Revert to os.path.join() semantics for path manipulation in importlib

which is different than what imp.cache_from_source() operates on.
parent 6c802b84
......@@ -65,17 +65,8 @@ def _r_long(int_bytes):
# and choosing in _setup().
def _path_join(*args):
"""Replacement for os.path.join()."""
if len(path_separators) == 1:
sep = path_sep
else:
for x in reversed(args[0]):
if x in path_separators:
sep = x
break
else:
sep = path_sep
return sep.join(x[:-len(sep)] if x.endswith(sep) else x
for x in args if x)
return path_sep.join(x[:-len(path_sep)] if x.endswith(path_sep) else x
for x in args if x)
def _path_split(path):
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment