From 69336923482274e61adb6c50d223d11ab9177256 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 11 Apr 2020 14:38:28 +0100 Subject: [PATCH] Ignore case in history search --- utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index 207719a3..a3440320 100644 --- a/utils.py +++ b/utils.py @@ -741,7 +741,7 @@ def searchBoxPosts(baseDir: str, nickname: str, domain: str, if not os.path.isdir(path): print('SEARCH: directory does not exist ' + path) return [] - searchStr = searchStr.strip() + searchStr = searchStr.lower().strip() if '+' in searchStr: searchWords = searchStr.split('+') @@ -755,7 +755,7 @@ def searchBoxPosts(baseDir: str, nickname: str, domain: str, for fname in fnames: filePath = os.path.join(root, fname) with open(filePath, 'r') as postFile: - data = postFile.read() + data = postFile.read().lower() notFound = False for keyword in searchWords: