Try default favicon extension

main
Bob Mottram 2021-01-07 12:07:02 +00:00
parent c62223815b
commit 7442eefbd0
1 changed files with 6 additions and 0 deletions

View File

@ -4856,6 +4856,12 @@ class PubServer(BaseHTTPRequestHandler):
faviconFilename = \ faviconFilename = \
baseDir + '/theme/' + self.server.themeName + \ baseDir + '/theme/' + self.server.themeName + \
'/icons/' + favFilename '/icons/' + favFilename
if not favFilename.endswith('.ico'):
if not os.path.isfile(faviconFilename):
if favFilename.endswith('.webp'):
favFilename = favFilename.replace('.webp', '.ico')
elif favFilename.endswith('.avif'):
favFilename = favFilename.replace('.avif', '.ico')
if not os.path.isfile(faviconFilename): if not os.path.isfile(faviconFilename):
# default favicon # default favicon
faviconFilename = \ faviconFilename = \