Skip to content
Myr

main: write_cache(): ignore entries with NULL-id

Before adoption: this commit came in with the history the project adopted, so no landing records it.

In application mode (non-dmenu), ignore entries with a NULL ID. All "normal" entries _will_ have a non-NULL ID, *but*, binaries pulled in from $PATH will *not*. This means we treat such binaries as "custom commands" - they are simply not cached. Closes #390

authored by Daniel Eklöf · committed by Daniel Eklöf · parent a709f29 · Browse files · 1 file+7 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−1 removed

  • other:+7 added−1 removed

1 file+7 added−1 removed

modified:main.c+7 added-1 removed
232 unmodified lines
233234 if (!apps->v[i]->visible)235 continue;236237 if (!dmenu || apps->v[i]->id != NULL) {237 if (!dmenu && apps->v[i]->id == NULL)238 continue;239240 if (dmenu && apps->v[i]->title == NULL)241 continue;242243 if (!dmenu) {244 const char *id = apps->v[i]->id;245 const size_t id_len = strlen(id);246247 if (write(fd, id, id_len) != id_len) {
1730 unmodified lines