Skip to content

Commit

Permalink
catch storage not available when deleting avatar
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Feb 25, 2022
1 parent 8b7c844 commit 215fa17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/Avatar/AvatarManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
use OCP\Files\IAppData;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\Files\StorageNotAvailableException;
use OCP\IAvatar;
use OCP\IAvatarManager;
use OCP\IConfig;
Expand Down Expand Up @@ -173,7 +174,7 @@ public function deleteUserAvatar(string $userId): void {
$folder->delete();
} catch (NotFoundException $e) {
$this->logger->debug("No cache for the user $userId. Ignoring avatar deletion");
} catch (NotPermittedException $e) {
} catch (NotPermittedException | StorageNotAvailableException $e) {
$this->logger->error("Unable to delete user avatars for $userId. gnoring avatar deletion");
} catch (NoUserException $e) {
$this->logger->debug("User $userId not found. gnoring avatar deletion");
Expand Down

0 comments on commit 215fa17

Please sign in to comment.