Also search for lower case

main
Bob Mottram 2020-05-31 18:36:04 +01:00
parent 09d63088f0
commit 4a265c91c3
1 changed files with 4 additions and 0 deletions

View File

@ -591,6 +591,10 @@ def htmlHashtagSearch(nickname: str, domain: str, port: int,
hashtag = hashtag[1:] hashtag = hashtag[1:]
hashtag = urllib.parse.unquote(hashtag) hashtag = urllib.parse.unquote(hashtag)
hashtagIndexFile = baseDir + '/tags/' + hashtag + '.txt' hashtagIndexFile = baseDir + '/tags/' + hashtag + '.txt'
if not os.path.isfile(hashtagIndexFile):
if hashtag != hashtag.lower():
hashtag = hashtag.lower()
hashtagIndexFile = baseDir + '/tags/' + hashtag + '.txt'
if not os.path.isfile(hashtagIndexFile): if not os.path.isfile(hashtagIndexFile):
print('WARN: hashtag file not found ' + hashtagIndexFile) print('WARN: hashtag file not found ' + hashtagIndexFile)
return None return None