Skip to content

Commit 0ac710c

Browse files
authored
Merge pull request #30 from orderthruchaos/join_paths_instead_of_concat
Use `os.path.join` to concatenate paths
2 parents 21a62ca + 8a6a473 commit 0ac710c

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)