Skip to content

Commit 8a6a473

Browse files
Use os.path.join to concatenate paths
1 parent 21a62ca commit 8a6a473

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_slideshow.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,11 @@ def _check_json_file(file):
244244
# Load the image names before setting order so they can be reordered.
245245
self._img_start = None
246246
self._file_list = [
247-
folder + f
247+
os.path.join(folder, f)
248248
for f in os.listdir(folder)
249249
if (
250250
not f.startswith(".")
251-
and (f.endswith(".bmp") or _check_json_file(folder + f))
251+
and (f.endswith(".bmp") or _check_json_file(os.path.join(folder, f)))
252252
)
253253
]
254254

0 commit comments

Comments
 (0)