diff options
author | Robin Appelman <robin@icewind.nl> | 2017-12-11 16:39:44 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-12-11 16:56:10 +0100 |
commit | 05d2f61a592861ecbd517307de2b868d35566300 (patch) | |
tree | 5cb7aedc61891ece0261939017f81e669b3963b3 /lib/private/Server.php | |
parent | 10aa287463b6888d2e418ad31fa3a390fbea359e (diff) | |
download | nextcloud-server-05d2f61a592861ecbd517307de2b868d35566300.tar.gz nextcloud-server-05d2f61a592861ecbd517307de2b868d35566300.zip |
handle not found mounts when cleaning avatars
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index 3f26f975f0f..0dfbcbb75ec 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -118,6 +118,7 @@ use OCP\Defaults; use OCA\Theming\Util; use OCP\Federation\ICloudIdManager; use OCP\Authentication\LoginCredentials\IStore; +use OCP\Files\NotFoundException; use OCP\ICacheFactory; use OCP\IDBConnection; use OCP\IL10N; @@ -1151,6 +1152,8 @@ class Server extends ServerContainer implements IServerContainer { try { $avatar = $manager->getAvatar($user->getUID()); $avatar->remove(); + } catch (NotFoundException $e) { + // no avatar to remove } catch (\Exception $e) { // Ignore exceptions $logger->info('Could not cleanup avatar of ' . $user->getUID()); |