From 6eb2dfbb5ed6f39c79089be10a12f6b680b3b608 Mon Sep 17 00:00:00 2001 From: Drew Ansbacher Date: Tue, 9 Nov 2021 12:30:55 -0700 Subject: [PATCH] wiz guid fix --- setup-wizard/src/app/pages/embassy/embassy.page.ts | 2 +- setup-wizard/src/app/pages/recover/recover.page.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/setup-wizard/src/app/pages/embassy/embassy.page.ts b/setup-wizard/src/app/pages/embassy/embassy.page.ts index c15812069..a79612913 100644 --- a/setup-wizard/src/app/pages/embassy/embassy.page.ts +++ b/setup-wizard/src/app/pages/embassy/embassy.page.ts @@ -47,7 +47,7 @@ export class EmbassyPage { } async chooseDrive (drive: DiskInfo) { - if (!!drive.partitions.find(p => p.used)) { + if (!!drive.partitions.find(p => p.used) || !!drive.guid) { const alert = await this.alertCtrl.create({ header: 'Warning', subHeader: 'Drive contains data!', diff --git a/setup-wizard/src/app/pages/recover/recover.page.ts b/setup-wizard/src/app/pages/recover/recover.page.ts index 092c5eb5b..471246e2e 100644 --- a/setup-wizard/src/app/pages/recover/recover.page.ts +++ b/setup-wizard/src/app/pages/recover/recover.page.ts @@ -43,9 +43,10 @@ export class RecoverPage { async getDrives () { try { - this.drives = (await this.apiService.getDrives()).filter(d => d.partitions.length) + const drives = (await this.apiService.getDrives()).filter(d => d.partitions.length) + this.drives = drives.filter(d => d.partitions.length) - const importableDrive = this.drives.find(d => !!d.guid) + const importableDrive = drives.find(d => !!d.guid) if (!!importableDrive && !this.hasShownGuidAlert) { const alert = await this.alertCtrl.create({ header: 'Embassy Drive Detected',