mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
ls/ls-url: do not show entry with size<=0 for a directory (#10687)
ls/ls-url: do not show size=0 when the entry is a directory
This commit is contained in:
@@ -28,7 +28,7 @@ def _format_entry(entry, name, with_size=True, with_hash=False):
|
||||
ret = []
|
||||
if with_size:
|
||||
size = entry.get("size")
|
||||
if size is None:
|
||||
if size is None or (size <= 0 and entry.get("isdir")):
|
||||
size = ""
|
||||
else:
|
||||
size = naturalsize(size)
|
||||
|
||||
Reference in New Issue
Block a user