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 Nov 8, 2017
1 parent 229565b commit 949fdc8
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 @@ -138,6 +138,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 949fdc8

Please sign in to comment.