mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
work directory supported.
This commit is contained in:
parent
12e942febc
commit
1a90fa90d6
1 changed files with 18 additions and 10 deletions
|
@ -53,6 +53,14 @@ const char *get_my_executable_path(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *get_my_executable_directory(void) {
|
const char *get_my_executable_directory(void) {
|
||||||
|
if (my_executable_directory != NULL) free(my_executable_directory);
|
||||||
|
char buf[1024];
|
||||||
|
// get current work directory
|
||||||
|
getcwd(buf, sizeof(buf));
|
||||||
|
// add / to end.
|
||||||
|
sprintf(buf, "%s%s", buf, PATHSEP);
|
||||||
|
// create on global
|
||||||
|
my_executable_directory = strdup(buf);
|
||||||
return my_executable_directory;
|
return my_executable_directory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue