mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 13:51:31 +00:00
Pass mode directly for indicator
This commit is contained in:
parent
ed55fbd9d5
commit
a62bcd3f87
|
@ -3598,9 +3598,9 @@ static void print_time(const time_t *timep)
|
||||||
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min);
|
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char get_detail_ind(const struct entry *ent)
|
static char get_detail_ind(const mode_t mode)
|
||||||
{
|
{
|
||||||
switch (ent->mode & S_IFMT) {
|
switch (mode & S_IFMT) {
|
||||||
case S_IFDIR: // fallthrough
|
case S_IFDIR: // fallthrough
|
||||||
case S_IFREG: return ' ';
|
case S_IFREG: return ' ';
|
||||||
case S_IFLNK: return '@';
|
case S_IFLNK: return '@';
|
||||||
|
@ -3737,7 +3737,7 @@ static void print_details(const struct entry *ent)
|
||||||
addstr(size);
|
addstr(size);
|
||||||
} else {
|
} else {
|
||||||
addstr(" ");
|
addstr(" ");
|
||||||
addch(get_detail_ind(ent));
|
addch(get_detail_ind(ent->mode));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue