diff --git a/ChangeLog b/ChangeLog index c33a044638516bebce42993f987a4c3c478654b2..0033e9bf5b62555fe470b594efca16d6b5fd6505 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ -1.2 - ? +1.2 - 2007-07-24 - Fixed some bugs on cygwin - Added du-like exclude patterns + - Fixed bug #1758403: large directories work fine now + - Rewrote a large part of the code + - Fixed a bug with wide characters + - Performance improvements when browsing large dirs 1.1 - 2007-04-30 - Deleting files and directories is now possible from diff --git a/NEWS b/NEWS index c33a044638516bebce42993f987a4c3c478654b2..0033e9bf5b62555fe470b594efca16d6b5fd6505 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ -1.2 - ? +1.2 - 2007-07-24 - Fixed some bugs on cygwin - Added du-like exclude patterns + - Fixed bug #1758403: large directories work fine now + - Rewrote a large part of the code + - Fixed a bug with wide characters + - Performance improvements when browsing large dirs 1.1 - 2007-04-30 - Deleting files and directories is now possible from diff --git a/src/browser.c b/src/browser.c index d4a04dbb4d89c7678f8f8595cd41fa9587c29100..ee93404df2c4c143deff63dbe7fea14417b84fe8 100644 --- a/src/browser.c +++ b/src/browser.c @@ -48,15 +48,16 @@ int cmp(struct dir *x, struct dir *y) { b = y; a = x; } if(!(bflags & BF_NDIRF) && y->flags & FF_DIR && !(x->flags & FF_DIR)) - r = 1; - else if(!(bflags & BF_NDIRF) && !(y->flags & FF_DIR) && x->flags & FF_DIR) - r = -1; - else if(bflags & BF_NAME) + return(1); + if(!(bflags & BF_NDIRF) && !(y->flags & FF_DIR) && x->flags & FF_DIR) + return(-1); + + if(bflags & BF_NAME) r = strcmp(a->name, b->name); - else if(bflags & BF_FILES) - r = (a->files - b->files); if(r == 0) r = a->size > b->size ? 1 : (a->size == b->size ? 0 : -1); + if(r == 0) + r = strcmp(a->name, b->name); return(r); } diff --git a/src/ncdu.h b/src/ncdu.h index f1ad29d95b4c9aff4b4580dc69b9240de8b05bb4..cca87ba9d03fa62a98868bd4eeaf0602d9165c7a 100644 --- a/src/ncdu.h +++ b/src/ncdu.h @@ -101,7 +101,6 @@ /* Browse Flags (int bflags) */ #define BF_NAME 1 #define BF_SIZE 2 -#define BF_FILES 4 #define BF_NDIRF 32 /* Normally, dirs before files, setting this disables it */ #define BF_DESC 64 #define BF_HIDE 128 /* don't show hidden files... */