Skip to content

Commit

Permalink
Since we update the avatar in the sync service remove the generated file
Browse files Browse the repository at this point in the history
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Oct 20, 2017
1 parent c29954f commit 706ed5b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/private/Avatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ public function set ($data) {
$this->remove();
$file = $this->folder->newFile('avatar.'.$type);
$file->putContent($data);

try {
$generated = $this->folder->getFile('generated');
$generated->delete();
} catch (NotFoundException $e) {
//
}
$this->user->triggerChange('avatar', $file);
}

Expand Down

0 comments on commit 706ed5b

Please sign in to comment.