Fix the PRS1 loader to fully import DS1 data after it skips DS2 data.

This was a very specific edge case: when there was a single new DS1
session, the error resulting from encountering DS2 data would make
OSCAR think that it had imported zero sessions, even though it had
half-imported the DS1 session. (Those sessions would be lost after
quitting OSCAR.)
This commit is contained in:
sawinglogz 2021-10-26 12:24:31 -04:00
parent 947a27b78a
commit 8fd2840e15
2 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,7 @@
<li>[fix] Update copyright notices in html files.</li>
<li>[fix] Correct value display on exact data points, and near session boundaries with drift.</li>
<li>[fix] Link to translations in Credits and Release Notes html is now translated to selected language.</li>
<li>[fix] Continue to import DreamStation 1 data even if there is (unsupported) DreamStation 2 data on the SD card.</li>
</ul>
<p>
<b>Changes and fixes in OSCAR v1.3.0</b>

View File

@ -737,7 +737,10 @@ int PRS1Loader::Open(const QString & selectedPath)
qWarning() << "PRS1Loader::Open() called without a valid m_ctx object present";
return 0;
}
c += OpenMachine(machinePath);
int imported = OpenMachine(machinePath);
if (imported > 0) { // don't let errors < 0 suppress subsequent successes
c += imported;
}
m_ctx->FlushUnexpectedMessages();
}
return c;