From f4bdb4d6e172d2d1d23cf42b0d27d9b851b6a980 Mon Sep 17 00:00:00 2001 From: Jeff Godfrey Date: Sat, 15 Jan 2022 17:34:18 -0600 Subject: [PATCH] Ignore hidden folders when loading images - While building the image cache, ignore hidden folders --- picframe/image_cache.py | 1 + 1 file changed, 1 insertion(+) diff --git a/picframe/image_cache.py b/picframe/image_cache.py index ee3db12..b640c85 100644 --- a/picframe/image_cache.py +++ b/picframe/image_cache.py @@ -356,6 +356,7 @@ def __get_modified_folders(self): out_of_date_folders = [] sql_select = "SELECT * FROM folder WHERE name = ?" for dir in [d[0] for d in os.walk(self.__picture_dir, followlinks=self.__follow_links)]: + if os.path.basename(dir)[0] == '.': continue # ignore hidden folders mod_tm = int(os.stat(dir).st_mtime) found = self.__db.execute(sql_select, (dir,)).fetchone() if not found or found['last_modified'] < mod_tm or found['missing'] == 1: