diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-04-29 01:53:41 +0000 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-05-31 00:19:14 +0000 |
commit | b85f882c23edb565de55ef43613b6e34c41fd028 (patch) | |
tree | b3fada07b6c6a46cf458cbebd354a9b00151fb71 | |
parent | 72fc8c907e7c709d212537f84ab124b3c66d56f7 (diff) | |
download | nextcloud-server-b85f882c23edb565de55ef43613b6e34c41fd028.tar.gz nextcloud-server-b85f882c23edb565de55ef43613b6e34c41fd028.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); |