Replace slashes

main
Bob Mottram 2020-10-13 22:45:53 +01:00
parent fd86985a09
commit 3ba7318220
1 changed files with 5 additions and 3 deletions

View File

@ -1017,9 +1017,11 @@ def setNewsAvatar(baseDir: str, name: str,
newFilename = baseDir + '/img/icons/' + name + '/avatar_news.png'
if not os.path.isfile(newFilename):
return
filename = baseDir + 'cache/avatars/' + \
httpPrefix + '://' + domainFull + '/users/' + nickname + \
'.png'
avatarFilename = \
httpPrefix + '://' + domainFull + '/users/' + nickname + '.png'
avatarFilename = avatarFilename.replace('/', '-')
filename = baseDir + 'cache/avatars/' + avatarFilename
if os.path.isfile(filename):
os.remove(filename)
if os.path.isdir(baseDir + 'cache/avatars'):