fix(columns): hide misleading directory sizes in size column
Problem: the size column shows the filesystem inode size (typically 4096 = 4.1k) for directories, which is misleading — users expect no size for directories. Solution: add an early return for directory entries in the size render function of the files, SSH, and S3 adapters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
abc4879688
commit
2aff22aa18
3 changed files with 15 additions and 2 deletions
|
|
@ -60,6 +60,9 @@ file_columns.size = {
|
|||
if not stat then
|
||||
return columns.EMPTY
|
||||
end
|
||||
if entry[FIELD_TYPE] == 'directory' then
|
||||
return columns.EMPTY
|
||||
end
|
||||
if stat.size >= 1e9 then
|
||||
return string.format('%.1fG', stat.size / 1e9)
|
||||
elseif stat.size >= 1e6 then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue