From ed5fed8fac22d97c05fdda8d446c3e0fe0be3e34 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 12 Sep 2019 20:16:52 +0200 Subject: [PATCH] Attempt to fallback to current directory if no HOME in env --- client/proxmark3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/proxmark3.c b/client/proxmark3.c index b07884b91..2ff94b841 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -323,6 +323,9 @@ const char *get_my_user_directory(void) { static void set_my_user_directory(void) { my_user_directory = getenv("HOME"); + // if not found, default to current directory + if (my_user_directory == NULL) + my_user_directory = "."; } static void show_help(bool showFullHelp, char *exec_name) {