diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-04-29 01:53:41 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-05-30 17:49:05 +0000 |
commit | f2850a6c0634fb7a06896ce1eb501b8105cba0fb (patch) | |
tree | 7adc6ee64648a7f0607af452e4ecd7b09b0299d2 | |
parent | 432bc9a58523c7563d2939d179ef98203ce56f2b (diff) | |
download | nextcloud-server-f2850a6c0634fb7a06896ce1eb501b8105cba0fb.tar.gz nextcloud-server-f2850a6c0634fb7a06896ce1eb501b8105cba0fb.zip |
Skip avatar on failure
Signed-off-by: Christopher Ng <chrng8@gmail.com>
-rw-r--r-- | apps/settings/lib/UserMigration/AccountMigrator.php | 4 |
1 files changed, 1 insertions, 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); |