diff options
author | 2018-03-24 19:05:12 -0400 | |
---|---|---|
committer | 2018-03-24 19:05:12 -0400 | |
commit | 4d5fae4567394ab4df9513dd1133ad5862858bd1 (patch) | |
tree | d3e1faa501294a834494d5775a2605030b815aec /swaybar/tray/icon.c | |
parent | Merge pull request #1615 from mikkeloscar/arch-travis-fix-next (diff) | |
parent | Fixed missing icons bug in index.theme parsing and a path concatenation bug i... (diff) | |
download | sway-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/icon.c')
-rw-r--r-- | swaybar/tray/icon.c | 6 |
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 */ |
29 | static list_t *find_inherits(const char *theme_dir) { | 29 | static 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 | } |