Skip avatar on failure

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2022-04-29 01:53:41 +00:00 committed by backportbot-nextcloud[bot]
parent 72fc8c907e
commit b85f882c23

View file

@ -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);