From c924e2d5898fc0803a0dac022778eec80674794e Mon Sep 17 00:00:00 2001 From: mwalker33 Date: Mon, 13 Apr 2020 13:51:03 +1000 Subject: [PATCH] save on exit --- client/preferences.c | 1 + client/proxmark3.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/client/preferences.c b/client/preferences.c index 94b97666a..1f409f745 100644 --- a/client/preferences.c +++ b/client/preferences.c @@ -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)) { diff --git a/client/proxmark3.c b/client/proxmark3.c index 910d49327..b981d1758 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -948,5 +948,8 @@ int main(int argc, char *argv[]) { CloseProxmark(); } +#ifdef USE_PREFERENCE_FILE + preferences_save (); +#endif exit(EXIT_SUCCESS); }