summaryrefslogtreecommitdiffstats
path: root/swaybar/tray
diff options
context:
space:
mode:
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 }