mirror of https://gitlab.com/bashrc2/epicyon
Merge branch 'main' of gitlab.com:bashrc2/epicyon
commit
034e0c6573
19
daemon.py
19
daemon.py
|
@ -12716,7 +12716,24 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
avatarFilename = \
|
avatarFilename = \
|
||||||
acctDir(baseDir, avatarNickname, domain) + '/' + avatarFile
|
acctDir(baseDir, avatarNickname, domain) + '/' + avatarFile
|
||||||
if not os.path.isfile(avatarFilename):
|
if not os.path.isfile(avatarFilename):
|
||||||
return False
|
originalExt = avatarFileExt
|
||||||
|
originalAvatarFile = avatarFile
|
||||||
|
altExt = getImageExtensions()
|
||||||
|
altFound = False
|
||||||
|
for alt in altExt:
|
||||||
|
if alt == originalExt:
|
||||||
|
continue
|
||||||
|
avatarFile = \
|
||||||
|
originalAvatarFile.replace('.' + originalExt,
|
||||||
|
'.' + alt)
|
||||||
|
avatarFilename = \
|
||||||
|
acctDir(baseDir, avatarNickname, domain) + \
|
||||||
|
'/' + avatarFile
|
||||||
|
if os.path.isfile(avatarFilename):
|
||||||
|
altFound = True
|
||||||
|
break
|
||||||
|
if not altFound:
|
||||||
|
return False
|
||||||
if self._etag_exists(avatarFilename):
|
if self._etag_exists(avatarFilename):
|
||||||
# The file has not changed
|
# The file has not changed
|
||||||
self._304()
|
self._304()
|
||||||
|
|
Loading…
Reference in New Issue