save on exit

This commit is contained in:
mwalker33 2020-04-13 13:51:03 +10:00
parent b72123a093
commit c924e2d589
2 changed files with 4 additions and 0 deletions

View file

@ -80,6 +80,7 @@ int preferences_save (void) {
// Note sure if backup has value ?
char backupFilename[500+sizeof(preferencesFilename)+10] = {0};
PrintAndLogEx(INFO,"Saving preferences ...");
snprintf (backupFilename,sizeof(backupFilename)-1,"%s.bak",prefGetFilename());
if (fileExists (backupFilename)) {

View file

@ -948,5 +948,8 @@ int main(int argc, char *argv[]) {
CloseProxmark();
}
#ifdef USE_PREFERENCE_FILE
preferences_save ();
#endif
exit(EXIT_SUCCESS);
}