Only attempt to delete profile avatar if it exists

Fixes #486
This commit is contained in:
AsamK 2021-02-13 15:16:54 +01:00
parent 40fc712581
commit 3ed776e4cc
2 changed files with 4 additions and 2 deletions

View file

@ -64,7 +64,9 @@ public class AvatarStore {
}
private void deleteAvatar(final File avatarFile) throws IOException {
Files.delete(avatarFile.toPath());
if (avatarFile.exists()) {
Files.delete(avatarFile.toPath());
}
}
private File getGroupAvatarFile(GroupId groupId) {