fix 500 error

pull/124/head
Aevann 2023-02-17 16:21:12 +02:00
parent 362cd288d8
commit d027e51faa
1 changed files with 3 additions and 2 deletions

View File

@ -526,11 +526,12 @@ def settings_images_profile(v):
if not imageurl: abort(400)
if v.highres and '/images/' in v.highres:
if v.highres and '/images/' in v.highres and path.isfile(v.highres):
os.remove(v.highres)
if v.profileurl and '/images/' in v.profileurl:
if v.profileurl and '/images/' in v.profileurl and path.isfile(v.profileurl):
os.remove(v.profileurl)
v.highres = highres
v.profileurl = imageurl
g.db.add(v)