From 3ba73182209fc602d6882cb9c7ab4a461345d29c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 13 Oct 2020 22:45:53 +0100 Subject: [PATCH] Replace slashes --- theme.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/theme.py b/theme.py index 49f9c20a6..fa1cdd179 100644 --- a/theme.py +++ b/theme.py @@ -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'):