mirror of
https://github.com/workinghard/jslisten.git
synced 2025-12-14 03:12:09 +00:00
Trying to fix $HOME bug
This commit is contained in:
@@ -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