mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
add get_my_user_directory() to centralize HOME processing
This commit is contained in:
parent
da68369e02
commit
46574ae0f5
5 changed files with 22 additions and 10 deletions
|
@ -49,7 +49,7 @@ static void fPrintAndLog(FILE *stream, const char *fmt, ...);
|
|||
int searchHomeFilePath(char **foundpath, const char *filename, bool create_home) {
|
||||
if (foundpath == NULL)
|
||||
return PM3_EINVARG;
|
||||
char *user_path = getenv("HOME");
|
||||
const char *user_path = get_my_user_directory();
|
||||
if (user_path == NULL) {
|
||||
fprintf(stderr, "Could not retrieve $HOME from the environment\n");
|
||||
return PM3_EFILE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue