Skip to content

Commit

Permalink
Fix get_bundle_root() on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dapetcu21 committed Sep 26, 2019
1 parent 818809d commit c87e453
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions defos/src/defos_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,7 @@ char* defos_get_bundle_root()
char* path = (char*)malloc(PATH_MAX + 2);
ssize_t ret = readlink("/proc/self/exe", path, PATH_MAX + 2);
if (ret >= 0 && ret <= PATH_MAX + 1) {
path[ret] = '\0';
result = copy_string(dirname(path));
} else {
const char* path2 = (const char*)getauxval(AT_EXECFN);
Expand Down

0 comments on commit c87e453

Please sign in to comment.