upip: Fix handling of non-existing absolute install paths.

The latest refactor of _makedirs() had a buf preventing to create them
properly.
pull/117/head
Paul Sokolovsky 2016-10-22 21:07:56 +03:00
rodzic d5d2395f0f
commit 7e9eed98cb
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -36,8 +36,11 @@ def op_basename(path):
def _makedirs(name, mode=0o777):
ret = False
s = ""
for c in name.rstrip("/").split("/")[:-1]:
if s:
comps = name.rstrip("/").split("/")[:-1]
if comps[0] == "":
s = "/"
for c in comps:
if s and s[-1] != "/":
s += "/"
s += c
try: