diff options
author | Olaf Hering <olaf@aepfle.de> | 2013-12-03 16:42:39 +0100 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2018-01-12 14:35:27 -0800 |
commit | 5619de2bcdceedfa101050b2b0d293d4d1290edd (patch) | |
tree | bd9ca1d5ec588aaafb5f871aeda3125b6a64dd45 /browser.c | |
parent | 0fa64ba93643aed33f92f3c8067ef33a83adf474 (diff) |
examine_directory: set directory/symlink size to zero
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 <olaf@aepfle.de>
Diffstat (limited to 'browser.c')
-rw-r--r-- | browser.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -451,8 +451,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; |