summaryrefslogtreecommitdiff
path: root/apps/filetypes.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/filetypes.c')
-rw-r--r--apps/filetypes.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c
index d690b554fd..ec9bd1a7ae 100644
--- a/apps/filetypes.c
+++ b/apps/filetypes.c
@@ -325,8 +325,8 @@ void read_color_theme_file(void) {
325 if (!global_settings.colors_file[0] || global_settings.colors_file[0] == '-') 325 if (!global_settings.colors_file[0] || global_settings.colors_file[0] == '-')
326 return; 326 return;
327 327
328 fd = open_pathfmt(O_RDONLY, THEME_DIR "/%s.colours", 328 fd = open_pathfmt(buffer, sizeof(buffer), O_RDONLY,
329 global_settings.colors_file); 329 THEME_DIR "/%s.colours", global_settings.colors_file);
330 if (fd < 0) 330 if (fd < 0)
331 return; 331 return;
332 while (read_line(fd, buffer, MAX_PATH) > 0) 332 while (read_line(fd, buffer, MAX_PATH) > 0)
@@ -365,10 +365,11 @@ void read_viewer_theme_file(void)
365 custom_filetype_icons[i] = filetypes[i].icon; 365 custom_filetype_icons[i] = filetypes[i].icon;
366 } 366 }
367 367
368 fd = open_pathfmt(O_RDONLY, "%s/%s.icons", ICON_DIR, 368 fd = open_pathfmt(buffer, sizeof(buffer), O_RDONLY,
369 global_settings.viewers_icon_file); 369 ICON_DIR "/%s.icons", global_settings.viewers_icon_file);
370 if (fd < 0) 370 if (fd < 0)
371 return; 371 return;
372
372 while (read_line(fd, buffer, MAX_PATH) > 0) 373 while (read_line(fd, buffer, MAX_PATH) > 0)
373 { 374 {
374 if (!settings_parseline(buffer, &ext, &icon)) 375 if (!settings_parseline(buffer, &ext, &icon))