Compare commits

...

1 commit

Author SHA1 Message Date
3e95b7ab9c
Make file content clear when meet a dir 2024-10-11 19:42:00 +01:00

3
ccc.c
View file

@ -837,10 +837,11 @@ void show_file_content()
{ {
file current_file = files->items[current_selection]; file current_file = files->items[current_selection];
wclear(preview_content);
if (strncmp(current_file.type, "DIR", 3) == 0) if (strncmp(current_file.type, "DIR", 3) == 0)
/* Print dir content */
return; return;
wclear(preview_content);
FILE *file = fopen(current_file.path, "r"); FILE *file = fopen(current_file.path, "r");
if (file == NULL) { if (file == NULL) {