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
committerChristopher Ng <chrng8@gmail.com>2022-05-30 20:49:05 +0300
commitf2850a6c0634fb7a06896ce1eb501b8105cba0fb (patch)
tree7adc6ee64648a7f0607af452e4ecd7b09b0299d2 /apps
parent432bc9a58523c7563d2939d179ef98203ce56f2b (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);