Commit e1cd3879 authored by Karel Slaný's avatar Karel Slaný
Browse files

Merge branch 'fix-pin-loss' into 'develop'

Fix PIN Loss

Addresses issue #39.

See merge request !29
parents 9fcec5da 523574b3
......@@ -244,7 +244,18 @@ int main(int argc, char *argv[])
/* Close all OTP connections if exist */
isds.closeAllOtpConnections();
saveAllSettings();
/*
* Store the configuration only when PIN has been recovered or is not
* used.
*/
if (!globSet._pinVal.isEmpty() ||
globSet.pinAlg.isEmpty() || globSet.pinSalt.isEmpty() || globSet.pinCode.isEmpty()) {
/*
* The PIN was set/recovered or
* incomplete data to check/recover the PIN were supplied.
*/
saveAllSettings();
}
delete globAccountsModelPtr;
globAccountsModelPtr = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment