Skip to content
Myr

icon: skip non-existing theme directories as early as possible

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

TODO: an even better improvement would be to walk all possible XDG data dirs and theme directory combinations when discovering the icon theme, and keeping a single, flat list of (existing) directories.

authored by Daniel Eklöf · committed by Daniel Eklöf · parent 28c5a05 · Browse files · 1 file+7 added−0 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−0 removed

  • other:+7 added−0 removed

1 file+7 added−0 removed

modified:icon.c+7 added
6 unmodified lines
7#include <stdbool.h>8#include <assert.h>9#include <unistd.h>10#include <limits.h>11#include <errno.h>1213#include <sys/stat.h>14#include <fcntl.h>15
730 unmodified lines
746 */747 continue;748 }749750 if (faccessat(xdg_dir->fd, theme_relative_path, R_OK, 0) != 0) {751 LOG_DBG("%s/%s (%s): %s, skipping", xdg_dir->path,752 theme_relative_path, theme->name, strerror(errno));753 continue;754 }755756 const int size = icon_dir->size;757 const int min_size = icon_dir->min_size;758 const int max_size = icon_dir->max_size;759 const int threshold = icon_dir->threshold;
187 unmodified lines