kopia lustrzana https://github.com/micropython/micropython-lib
os: Proactively filter all str/bytes variants of "."/"..".
rodzic
eb0981496a
commit
f815a2a9f0
|
@ -132,7 +132,7 @@ def listdir(path="."):
|
||||||
res = []
|
res = []
|
||||||
for dirent in ilistdir(path):
|
for dirent in ilistdir(path):
|
||||||
fname = dirent[0]
|
fname = dirent[0]
|
||||||
if fname != b"." and fname != b"..":
|
if fname not in (b".", b"..", ".", ".."):
|
||||||
if is_str:
|
if is_str:
|
||||||
fname = fsdecode(fname)
|
fname = fsdecode(fname)
|
||||||
res.append(fname)
|
res.append(fname)
|
||||||
|
|
Ładowanie…
Reference in New Issue