mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-09 17:56:53 +08:00
save on exit
This commit is contained in:
parent
b72123a093
commit
c924e2d589
2 changed files with 4 additions and 0 deletions
|
@ -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)) {
|
||||
|
|
|
@ -948,5 +948,8 @@ int main(int argc, char *argv[]) {
|
|||
CloseProxmark();
|
||||
}
|
||||
|
||||
#ifdef USE_PREFERENCE_FILE
|
||||
preferences_save ();
|
||||
#endif
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue