upip: _makedirs(): Make compatible with FatFs quirks.

Don't have trailing "/" in paths.
pull/106/head
Paul Sokolovsky 2016-10-08 01:17:20 +03:00
rodzic c06f693ac3
commit 69390da38f
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -35,7 +35,9 @@ def _makedirs(name, mode=0o777):
ret = False ret = False
s = "" s = ""
for c in name.rstrip("/").split("/"): for c in name.rstrip("/").split("/"):
s += c + "/" if s:
s += "/"
s += c
try: try:
os.mkdir(s) os.mkdir(s)
ret = True ret = True