improvenments to rendering and start of thread_btm

This commit is contained in:
nova
2025-07-05 22:20:32 +02:00
parent 539af5fd65
commit 142f75d98a
3 changed files with 45 additions and 3 deletions

View File

@ -71,6 +71,8 @@ void get_dir_content(char *path, unsigned long *dir_file_count, file *dir_conten
lstat(full_path, file);
dir_content[i].file_size = file->st_size;
dir_content[i].permissions = 1;
dir_content[i].permissions = file->st_mode;
if (S_ISDIR(file->st_mode)) {
dir_content[i].file_type = FILE_TYPE_DIR;
@ -82,8 +84,8 @@ void get_dir_content(char *path, unsigned long *dir_file_count, file *dir_conten
} else if (S_ISBLK(file->st_mode)) {
dir_content[i].file_type = FILE_TYPE_BLOCK;
dir_content[i].color_pair = COLOR_BLOCK;
/*} else if (S_ISCHR(file->st_mode)) {
dir_content[i].file_type = COLOR_CHARDEV; */
} else if (S_ISCHR(file->st_mode)) {
dir_content[i].file_type = COLOR_CHARDEV;
} else if (S_ISLNK(file->st_mode)) {
dir_content[i].file_type = FILE_TYPE_SYMLINK;
dir_content[i].color_pair = COLOR_SYMLINK;