From f2850a6c0634fb7a06896ce1eb501b8105cba0fb Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Fri, 29 Apr 2022 01:53:41 +0000 Subject: [PATCH] Skip avatar on failure Signed-off-by: Christopher Ng --- apps/settings/lib/UserMigration/AccountMigrator.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/settings/lib/UserMigration/AccountMigrator.php b/apps/settings/lib/UserMigration/AccountMigrator.php index 321889788b8..bf1af10d464 100644 --- a/apps/settings/lib/UserMigration/AccountMigrator.php +++ b/apps/settings/lib/UserMigration/AccountMigrator.php @@ -73,8 +73,6 @@ class AccountMigrator implements IMigrator, ISizeEstimationMigrator { * {@inheritDoc} */ public function getEstimatedExportSize(IUser $user): int { - $uid = $user->getUID(); - $size = 100; // 100KiB for account JSON try { @@ -84,7 +82,7 @@ class AccountMigrator implements IMigrator, ISizeEstimationMigrator { $size += $avatarFile->getSize() / 1024; } } catch (Throwable $e) { - return 0; + // Skip avatar in size estimate on failure } return (int)ceil($size); -- 2.39.5