diff --git a/src/browser.c b/src/browser.c index f77da29..8d25ae8 100644 --- a/src/browser.c +++ b/src/browser.c @@ -227,7 +227,8 @@ void drawBrowser(int change) { n->flags & FF_ERR ? '!' : n->flags & FF_SERR ? '.' : n->flags & FF_OTHFS ? '>' : - n->flags & FF_OTHER ? '@' : + !(n->flags & FF_FILE + || n->flags & FF_DIR) ? '@' : n->flags & FF_DIR && n->sub == NULL ? 'e' : ' ' ; diff --git a/src/calc.c b/src/calc.c index 08ef922..5a6f528 100644 --- a/src/calc.c +++ b/src/calc.c @@ -313,8 +313,7 @@ int calcDir(struct dir *dest, char *path) { if(!(d->flags & FF_EXL)) for(t = dest; t != NULL; t = t->parent) t->dirs++; - } else - d->flags |= FF_OTHER; + } /* count the size */ if(!(d->flags & FF_EXL || d->flags & FF_OTHFS)) { diff --git a/src/ncdu.h b/src/ncdu.h index b529c63..7e947b6 100644 --- a/src/ncdu.h +++ b/src/ncdu.h @@ -80,15 +80,14 @@ * G L O B A L F L A G S */ /* File Flags (struct dir -> flags) */ -#define FF_DIR 1 -#define FF_FILE 2 -#define FF_OTHER 4 -#define FF_ERR 8 -#define FF_OTHFS 16 -#define FF_SERR 32 /* error in subdirectory */ -#define FF_BSEL 64 /* selected */ -#define FF_EXL 128 /* excluded using exlude patterns */ -#define FF_PAR 256 /* reference to parent directory (hack) */ +#define FF_DIR 0x01 +#define FF_FILE 0x02 +#define FF_ERR 0x04 /* error while reading this item */ +#define FF_OTHFS 0x08 /* excluded because it was an other filesystem */ +#define FF_EXL 0x10 /* excluded using exlude patterns */ +#define FF_SERR 0x20 /* error in subdirectory */ +#define FF_BSEL 0x40 /* selected */ +#define FF_PAR 0x80 /* reference to parent directory (hack) */ /* Settings Flags (int sflags) */ #define SF_SMFS 1 /* same filesystem */