mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-21 10:27:18 +00:00
Fix .hamlib_settings path when home==null
https://github.com/Hamlib/Hamlib/issues/985
This commit is contained in:
parent
28e3ed2c37
commit
0e79b25655
@ -997,11 +997,15 @@ HAMLIB_EXPORT(int) rig_settings_get_path(char *path, int pathlen)
|
||||
{
|
||||
snprintf(path, pathlen-1, "%s/.config/%s", home, SETTINGS_FILE);
|
||||
}
|
||||
else
|
||||
else if (home)
|
||||
{
|
||||
// we add a leading period to hide the file
|
||||
snprintf(path, pathlen-1, "%s/.%s", home, SETTINGS_FILE);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(path, pathlen-1, ".%s", SETTINGS_FILE);
|
||||
}
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: path=%s\n", __func__, path);
|
||||
return RIG_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user