diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-10-20 20:15:26 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-11-29 14:23:15 +0100 |
commit | d5496dc435eeff931ab1d540ea4b069520e88e12 (patch) | |
tree | 7b876c45d39278b19099a7c0490952fbbec64056 /lib/private/Avatar.php | |
parent | 03d9e7e963c704eb5b4f48c495fac9310b9f2e0d (diff) | |
download | nextcloud-server-d5496dc435eeff931ab1d540ea4b069520e88e12.tar.gz nextcloud-server-d5496dc435eeff931ab1d540ea4b069520e88e12.zip |
Since we update the avatar in the sync service remove the generated file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Avatar.php')
-rw-r--r-- | lib/private/Avatar.php | 7 |
1 files changed, 7 insertions, 0 deletions
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); } |