From 1a258eae34c6f5201b1845c4d8f40b2dd69cc513 Mon Sep 17 00:00:00 2001 From: Phil Olynyk Date: Thu, 13 Feb 2020 20:37:52 -0500 Subject: [PATCH] Update machine.info.version after upgrade re-import --- oscar/SleepLib/profiles.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/oscar/SleepLib/profiles.cpp b/oscar/SleepLib/profiles.cpp index edf94273..13bb6b27 100644 --- a/oscar/SleepLib/profiles.cpp +++ b/oscar/SleepLib/profiles.cpp @@ -565,7 +565,11 @@ void Profile::DataFormatError(Machine *m) } // Note: I deliberately haven't added a Profile help for this if (backups) { - mainwin->importCPAP(ImportPath(m->getBackupPath(), lookupLoader(m)), QObject::tr("Rebuilding from %1 Backup").arg(m->brand())); + MachineLoader * loader = lookupLoader(m); + int c = mainwin->importCPAP(ImportPath(m->getBackupPath(), loader), + QObject::tr("Rebuilding from %1 Backup").arg(m->brand())); + if ( c > 0 ) + m->info.version = loader->Version(); } else { if (!p_profile->session->backupCardData()) { // Automatic backups not available for Intellipap users yet, so don't taunt them..