Skip to content

Commit

Permalink
Merge pull request #30 from orderthruchaos/join_paths_instead_of_concat
Browse files Browse the repository at this point in the history
Use `os.path.join` to concatenate paths
  • Loading branch information
ladyada committed Dec 20, 2020
2 parents 21a62ca + 8a6a473 commit 0ac710c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adafruit_slideshow.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ def _check_json_file(file):
# Load the image names before setting order so they can be reordered.
self._img_start = None
self._file_list = [
folder + f
os.path.join(folder, f)
for f in os.listdir(folder)
if (
not f.startswith(".")
and (f.endswith(".bmp") or _check_json_file(folder + f))
and (f.endswith(".bmp") or _check_json_file(os.path.join(folder, f)))
)
]

Expand Down

0 comments on commit 0ac710c

Please sign in to comment.