From 4c23db46c53dbe86ca8e91243eb851521ece22c1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 4 May 2020 19:39:21 +0100 Subject: [PATCH] Case insensitive getting of avatar from cache --- cache.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cache.py b/cache.py index c071b524..3bba9a97 100644 --- a/cache.py +++ b/cache.py @@ -10,7 +10,7 @@ import os import datetime from utils import loadJson from utils import saveJson - +from utils import getFileCaseInsensitive def storePersonInCache(baseDir: str, personUrl: str, personJson: {}, personCache: {}) -> None: @@ -40,8 +40,8 @@ def getPersonFromCache(baseDir: str, personUrl: str, personCache: {}) -> {}: if not personCache.get(personUrl): cacheFilename = baseDir + '/cache/actors/' + \ personUrl.replace('/', '#')+'.json' - if os.path.isfile(cacheFilename): - personJson = loadJson(cacheFilename) + if os.path.isfile(getFileCaseInsensitive(cacheFilename)): + personJson = loadJson(getFileCaseInsensitive(cacheFilename)) if personJson: storePersonInCache(baseDir, personUrl, personJson, personCache) loadedFromFile = True