Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-04-29 04:53:41 +0300
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-05-31 03:19:14 +0300
commitb85f882c23edb565de55ef43613b6e34c41fd028 (patch)
treeb3fada07b6c6a46cf458cbebd354a9b00151fb71 /apps
parent72fc8c907e7c709d212537f84ab124b3c66d56f7 (diff)
Skip avatar on failure
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/lib/UserMigration/AccountMigrator.php4
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);