mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Reformat UID/GID printing in statusbar
This commit is contained in:
parent
df6dbbb84c
commit
a6a09338a2
17
src/nnn.c
17
src/nnn.c
|
@ -5624,7 +5624,7 @@ static bool set_time_type(int *presel)
|
||||||
static void statusbar(char *path)
|
static void statusbar(char *path)
|
||||||
{
|
{
|
||||||
int i = 0, extnlen = 0;
|
int i = 0, extnlen = 0;
|
||||||
char *ptr, guidbuf[5];
|
char *ptr;
|
||||||
pEntry pent = &pdents[cur];
|
pEntry pent = &pdents[cur];
|
||||||
|
|
||||||
if (!ndents) {
|
if (!ndents) {
|
||||||
|
@ -5687,20 +5687,9 @@ static void statusbar(char *path)
|
||||||
struct passwd *pw = getpwuid(pent->uid);
|
struct passwd *pw = getpwuid(pent->uid);
|
||||||
struct group *gr = getgrgid(pent->gid);
|
struct group *gr = getgrgid(pent->gid);
|
||||||
|
|
||||||
if (pw)
|
addstr(pw ? pw->pw_name : xitoa(pent->uid));
|
||||||
addstr(pw->pw_name);
|
|
||||||
else {
|
|
||||||
sprintf(guidbuf, "%d", pent->uid);
|
|
||||||
addstr(guidbuf);
|
|
||||||
}
|
|
||||||
addch(':');
|
addch(':');
|
||||||
|
addstr(gr ? gr->gr_name : xitoa(pent->gid));
|
||||||
if (gr)
|
|
||||||
addstr(gr->gr_name);
|
|
||||||
else {
|
|
||||||
sprintf(guidbuf, "%d", pent->gid);
|
|
||||||
addstr(guidbuf);
|
|
||||||
}
|
|
||||||
addch(' ');
|
addch(' ');
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue