From 3d47e0410f90031c5ae3a041eacb6f90b4d0e2cd Mon Sep 17 00:00:00 2001 From: nova Date: Sun, 8 Feb 2026 18:49:55 +0100 Subject: [PATCH] check if dir is empty --- window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/window.c b/window.c index 3219c2d..20ca1fc 100644 --- a/window.c +++ b/window.c @@ -42,7 +42,9 @@ void window_top(WINDOW *win){ mvwaddstr(win, 0, 0, top_buffer); mvwaddch(win, 0, strlen(top_buffer), '/'); wattroff(win, COLOR_PAIR(COLOR_PATH)); - mvwaddstr(win, 0, strlen(top_buffer)+1, mid_content[selected_file_current].file_name); + if (mid_file_count != 0) { + mvwaddstr(win, 0, strlen(top_buffer)+1, mid_content[selected_file_current].file_name); + } } pthread_mutex_unlock(&mutex_top); } else {