Skip to content

Commit

Permalink
Fix startup when using relative paths
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Jan 29, 2024
1 parent 503c5ed commit 5c7f1d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/systray/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ void initEvironment()
getcwd(appDir, PATH_MAX - 1);
std::strncat(appDir, info.dli_fname + 1, PATH_MAX - 1);
}
else if (info.dli_fname[0] != '/')
{
getcwd(appDir, PATH_MAX - 1);
std::strncat(appDir, "/", PATH_MAX - 1);
std::strncat(appDir, info.dli_fname, PATH_MAX - 1);
}
else
{
std::strncpy(appDir, info.dli_fname, PATH_MAX - 1);
Expand Down

0 comments on commit 5c7f1d4

Please sign in to comment.