Skip to content

Commit be3fc76

Browse files
authored
Merge pull request #2421 from adafruit/TheKitty-patch-3
Update code.py
2 parents a094e80 + 478ebcc commit be3fc76

File tree

1 file changed

+6
-6
lines changed
  • PyPortal_Floppy_with_Display

1 file changed

+6
-6
lines changed

PyPortal_Floppy_with_Display/code.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
def get_files(base):
2222
files = os.listdir(base)
2323
file_names = []
24-
for file in enumerate(files):
25-
if not file.startswith("."):
26-
if file not in ('boot_out.txt', 'System Volume Information'):
27-
stats = os.stat(base + file)
24+
for isdir, filetext in enumerate(files):
25+
if not filetext.startswith("."):
26+
if filetext not in ('boot_out.txt', 'System Volume Information'):
27+
stats = os.stat(base + filetext)
2828
isdir = stats[0] & 0x4000
2929
if isdir:
30-
file_names.append((file, True))
30+
file_names.append((filetext, True))
3131
else:
32-
file_names.append((file, False))
32+
file_names.append((filetext, False))
3333
return filenames
3434

3535
def get_touch(screen):

0 commit comments

Comments
 (0)