From 8a6a4735479718bcf05a27f8499ae3f5c9fb731f Mon Sep 17 00:00:00 2001 From: Brett DiFrischia Date: Sun, 20 Dec 2020 11:25:31 -0600 Subject: [PATCH] Use `os.path.join` to concatenate paths --- adafruit_slideshow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_slideshow.py b/adafruit_slideshow.py index 3072bcd..782fde3 100755 --- a/adafruit_slideshow.py +++ b/adafruit_slideshow.py @@ -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))) ) ]