The size of a directory or symlink in the folder browser is not meaningful.
For directories it means just how many blocks were allocated to hold all
entries. It does not mean that the entries are still present in the directory.
For symlinks its the size of the target.
Set both to zero to simplify the folder browser output.

Signed-off-by: Olaf Hering <o...@aepfle.de>
---
 browser.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/browser.c b/browser.c
index a491e2e..ef9783f 100644
--- a/browser.c
+++ b/browser.c
@@ -428,8 +428,10 @@ static int examine_directory (MUTTMENU *menu, struct 
browser_state *state,
     if (lstat (buffer, &s) == -1)
       continue;
     
-    if ((! S_ISREG (s.st_mode)) && (! S_ISDIR (s.st_mode)) &&
-       (! S_ISLNK (s.st_mode)))
+    /* No size for directories or symlinks */
+    if (S_ISDIR (s.st_mode) || S_ISLNK (s.st_mode))
+      s.st_size = 0;
+    else if (! S_ISREG (s.st_mode))
       continue;
     
     tmp = Incoming;

Reply via email to