From d5496dc435eeff931ab1d540ea4b069520e88e12 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 20 Oct 2017 20:15:26 +0200 Subject: Since we update the avatar in the sync service remove the generated file Signed-off-by: Roeland Jago Douma --- lib/private/Avatar.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/private/Avatar.php') diff --git a/lib/private/Avatar.php b/lib/private/Avatar.php index 833d430ac01..583a83f5166 100644 --- a/lib/private/Avatar.php +++ b/lib/private/Avatar.php @@ -138,6 +138,13 @@ class Avatar implements IAvatar { $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); } -- cgit v1.2.3