kopia lustrzana https://github.com/Hamlib/Hamlib
Fix .hamlib_settings path when home==null
https://github.com/Hamlib/Hamlib/issues/985pull/1077/head
rodzic
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;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue