mirror of
https://github.com/workinghard/jslisten.git
synced 2025-12-13 19:02:09 +00:00
Trying to fix $HOME bug
This commit is contained in:
BIN
bin/jslisten
BIN
bin/jslisten
Binary file not shown.
@@ -89,7 +89,11 @@ int buttonDefined(int val) {
|
||||
int getConfigFile() {
|
||||
int rc=1; // Default nothing found
|
||||
// Determine home dir
|
||||
strcat(strcpy(iniFile, getenv("HOME")), myConfFile);
|
||||
char *homeEnv = getenv("HOME");
|
||||
int strLength = strlen(homeEnv);
|
||||
if (strLength > 0 ) {
|
||||
strcat(strncpy(iniFile, homeEnv, strLength), myConfFile);
|
||||
}
|
||||
|
||||
// Look for personal file
|
||||
if( access( iniFile, R_OK ) != -1 ) {
|
||||
|
||||
Reference in New Issue
Block a user