kopia lustrzana https://github.com/micropython/micropython-lib
upip: _makedirs(): Make compatible with FatFs quirks.
Don't have trailing "/" in paths.pull/106/head
rodzic
c06f693ac3
commit
69390da38f
|
@ -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
|
||||||
|
|
Ładowanie…
Reference in New Issue