Skip to content

Commit 3db5b42

Browse files
authored
Merge pull request #4700 from vpatkov/bsize-show-computed
Show size in 'bsize' format for dirs if's computed
2 parents a40099a + ad40750 commit 3db5b42

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/man/mc.1.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,8 @@ displays the file size.
810810
is an alternative form of the
811811
.B size
812812
format. It displays the size of the files and for directories it just
813-
shows SUB\-DIR or UP\-\-DIR.
813+
shows SUB\-DIR or UP\-\-DIR unless the directory size is computed by the
814+
"Show directory sizes" command.
814815
.TP
815816
.B type
816817
displays a one character wide type field. This character is similar to

src/filemanager/panel.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,8 @@ string_file_size_brief (const file_entry_t *fe, int len)
424424
if (S_ISLNK (fe->st.st_mode) && !link_isdir (fe))
425425
return _ ("SYMLINK");
426426

427-
if ((S_ISDIR (fe->st.st_mode) || link_isdir (fe)) && !DIR_IS_DOTDOT (fe->fname->str))
427+
if ((S_ISDIR (fe->st.st_mode) || link_isdir (fe)) && !fe->f.dir_size_computed
428+
&& !DIR_IS_DOTDOT (fe->fname->str))
428429
return _ ("SUB-DIR");
429430

430431
return string_file_size (fe, len);

0 commit comments

Comments
 (0)