Skip to content

Commit

Permalink
just trim cfggetdir return at render
Browse files Browse the repository at this point in the history
  • Loading branch information
KrahJohlito committed Dec 20, 2024
1 parent 940c7aa commit 4986867
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,7 @@ char *configGetDir(void)

void configPrepareNotifications(char *prefix)
{
char *colpos;

snprintf(cfgDevice, sizeof(cfgDevice), prefix);

if ((colpos = strchr(cfgDevice, ':')) != NULL)
*(colpos + 1) = '\0';
}

void configInit(char *prefix)
Expand Down
5 changes: 5 additions & 0 deletions src/opl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,11 @@ int saveConfig(int types, int showUI)
if (showUI) {
if (lscret) {
char *path = configGetDir();
if (path != NULL) {
char *colpos = strchr(path, ':');
if (colpos != NULL)
*(colpos + 1) = '\0';
}

snprintf(notification, sizeof(notification), _l(_STR_SETTINGS_SAVED), path);

Expand Down

0 comments on commit 4986867

Please sign in to comment.