aboutsummaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-24 19:28:52 -0400
committerGitHub <noreply@github.com>2018-03-24 19:28:52 -0400
commit45f14fcb24b6dae8bb78efb1ec7d7a51cb9a4d2c (patch)
treed3e1faa501294a834494d5775a2605030b815aec /swaybar
parent0088aa4f9fa39c66a6f07d0079b8645879d8b373 (diff)
parent4d5fae4567394ab4df9513dd1133ad5862858bd1 (diff)
Merge pull request #1633 from mckinney-subgraph/0.15
Fixed missing icons bug in index.theme parsing (2)
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/tray/icon.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/swaybar/tray/icon.c b/swaybar/tray/icon.c
index fc9b176d..8e66ae3b 100644
--- a/swaybar/tray/icon.c
+++ b/swaybar/tray/icon.c
@@ -28,7 +28,7 @@
/* Finds all themes that the given theme inherits */
static list_t *find_inherits(const char *theme_dir) {
const char inherits[] = "Inherits";
- const char index_name[] = "index.theme";
+ const char index_name[] = "/index.theme";
list_t *themes = create_list();
FILE *index = NULL;
char *path = malloc(strlen(theme_dir) + sizeof(index_name));
@@ -286,6 +286,10 @@ static list_t* find_theme_subdirs(const char *theme_dir) {
}
if (strncmp(directories, buf, sizeof(directories) - 1) == 0) {
char *dirstr = buf + sizeof(directories);
+ int len = strlen(dirstr);
+ if (dirstr[len-1] == '\n') {
+ dirstr[len-1] = '\0';
+ }
dirs = split_subdirs(dirstr);
break;
}