Browse Source

Simpler permission string generation

master
Arun Prakash Jana 5 years ago
parent
commit
ace449c0e9
No known key found for this signature in database GPG Key ID: A75979F35C080412
1 changed files with 3 additions and 6 deletions
  1. +3
    -6
      src/nnn.c

+ 3
- 6
src/nnn.c View File

@@ -2126,12 +2126,9 @@ static void printent_long(const struct entry *ent, int sel, uint namecols)
strftime(timebuf, 18, "%F %R", localtime(&ent->t));

/* Permissions */
permbuf[0] = *xitoa((ent->mode >> 6) & 7);
permbuf[0] = permbuf[0] ? permbuf[0] : '0';
permbuf[1] = *xitoa((ent->mode >> 3) & 7);
permbuf[1] = permbuf[1] ? permbuf[1] : '0';
permbuf[2] = *xitoa(ent->mode & 7);
permbuf[2] = permbuf[2] ? permbuf[2] : '0';
permbuf[0] = '0' + ((ent->mode >> 6) & 7);
permbuf[1] = '0' + ((ent->mode >> 3) & 7);
permbuf[2] = '0' + (ent->mode & 7);
permbuf[3] = '\0';

/* Trim escape chars from name */


Loading…
Cancel
Save