Skip to content
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.

Commit

Permalink
recovery: don't reset storage on typos during dry-run recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed Jul 31, 2017
1 parent a9a414d commit ace1d84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions firmware/recovery.c
Expand Up @@ -450,7 +450,9 @@ static void recovery_scrambledword(const char *word)
{
if (word_pos == 0) { // fake word
if (strcmp(word, fake_word) != 0) {
storage_reset();
if (!dry_run) {
storage_reset();
}
fsm_sendFailure(FailureType_Failure_ProcessError, _("Wrong word retyped"));
layoutHome();
return;
Expand All @@ -467,7 +469,9 @@ static void recovery_scrambledword(const char *word)
wl++;
}
if (!found) {
storage_reset();
if (!dry_run) {
storage_reset();
}
fsm_sendFailure(FailureType_Failure_DataError, _("Word not found in a wordlist"));
layoutHome();
return;
Expand Down

0 comments on commit ace1d84

Please sign in to comment.