}
private void deleteAvatar(final File avatarFile) throws IOException {
- Files.delete(avatarFile.toPath());
+ if (avatarFile.exists()) {
+ Files.delete(avatarFile.toPath());
+ }
}
private File getGroupAvatarFile(GroupId groupId) {
: avatarPath == null ? null : Optional.of(new File(avatarPath));
m.setProfile(name, about, aboutEmoji, avatarFile);
} catch (IOException e) {
- System.err.println("UpdateAccount error: " + e.getMessage());
+ System.err.println("Update profile error: " + e.getMessage());
return 3;
}