summaryrefslogtreecommitdiffstats
path: root/swaybar/tray
diff options
context:
space:
mode:
authorLibravatar David McKinney <mckinney@subgraph.com>2018-03-24 19:05:12 -0400
committerLibravatar David McKinney <mckinney@subgraph.com>2018-03-24 19:05:12 -0400
commit4d5fae4567394ab4df9513dd1133ad5862858bd1 (patch)
treed3e1faa501294a834494d5775a2605030b815aec /swaybar/tray
parentMerge pull request #1615 from mikkeloscar/arch-travis-fix-next (diff)
parentFixed missing icons bug in index.theme parsing and a path concatenation bug i... (diff)
downloadsway-4d5fae4567394ab4df9513dd1133ad5862858bd1.tar.gz
sway-4d5fae4567394ab4df9513dd1133ad5862858bd1.tar.zst
sway-4d5fae4567394ab4df9513dd1133ad5862858bd1.zip
Merge remote-tracking branch 'remotes/origin/bugfix/iconsnotfound' into 0.15
Diffstat (limited to 'swaybar/tray')
-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 @@
28/* Finds all themes that the given theme inherits */ 28/* Finds all themes that the given theme inherits */
29static list_t *find_inherits(const char *theme_dir) { 29static list_t *find_inherits(const char *theme_dir) {
30 const char inherits[] = "Inherits"; 30 const char inherits[] = "Inherits";
31 const char index_name[] = "index.theme"; 31 const char index_name[] = "/index.theme";
32 list_t *themes = create_list(); 32 list_t *themes = create_list();
33 FILE *index = NULL; 33 FILE *index = NULL;
34 char *path = malloc(strlen(theme_dir) + sizeof(index_name)); 34 char *path = malloc(strlen(theme_dir) + sizeof(index_name));
@@ -286,6 +286,10 @@ static list_t* find_theme_subdirs(const char *theme_dir) {
286 } 286 }
287 if (strncmp(directories, buf, sizeof(directories) - 1) == 0) { 287 if (strncmp(directories, buf, sizeof(directories) - 1) == 0) {
288 char *dirstr = buf + sizeof(directories); 288 char *dirstr = buf + sizeof(directories);
289 int len = strlen(dirstr);
290 if (dirstr[len-1] == '\n') {
291 dirstr[len-1] = '\0';
292 }
289 dirs = split_subdirs(dirstr); 293 dirs = split_subdirs(dirstr);
290 break; 294 break;
291 } 295 }