]> source.dussan.org Git - nextcloud-server.git/commitdiff
Skip avatar on failure
authorChristopher Ng <chrng8@gmail.com>
Fri, 29 Apr 2022 01:53:41 +0000 (01:53 +0000)
committerChristopher Ng <chrng8@gmail.com>
Mon, 30 May 2022 17:49:05 +0000 (17:49 +0000)
Signed-off-by: Christopher Ng <chrng8@gmail.com>
apps/settings/lib/UserMigration/AccountMigrator.php

index 321889788b8b5cae308b892595ad55450c5fa045..bf1af10d46444b7c29169e1107a583cc93e61da5 100644 (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);