save on exit
This commit is contained in:
@@ -80,6 +80,7 @@ int preferences_save (void) {
|
|||||||
// Note sure if backup has value ?
|
// Note sure if backup has value ?
|
||||||
char backupFilename[500+sizeof(preferencesFilename)+10] = {0};
|
char backupFilename[500+sizeof(preferencesFilename)+10] = {0};
|
||||||
|
|
||||||
|
PrintAndLogEx(INFO,"Saving preferences ...");
|
||||||
snprintf (backupFilename,sizeof(backupFilename)-1,"%s.bak",prefGetFilename());
|
snprintf (backupFilename,sizeof(backupFilename)-1,"%s.bak",prefGetFilename());
|
||||||
|
|
||||||
if (fileExists (backupFilename)) {
|
if (fileExists (backupFilename)) {
|
||||||
|
|||||||
@@ -948,5 +948,8 @@ int main(int argc, char *argv[]) {
|
|||||||
CloseProxmark();
|
CloseProxmark();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_PREFERENCE_FILE
|
||||||
|
preferences_save ();
|
||||||
|
#endif
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user