Skip to content

Commit 0c9e040

Browse files
committed
2.19.08.23 修复空目录引发的异常
1 parent 5d15368 commit 0c9e040

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bin/mtls-big-files

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ class BigFiles(object):
5555

5656

5757
def __str__(self):
58+
if len(self._files) == 0:
59+
return "empty dir"
60+
5861
max_file_path_length = max( [len(f.file_path) for f in self._files] )
5962
max_size_length = max( [len(fileformat(f.file_size)) for f in self._files] )
6063
head = f"*" * (max_file_path_length + max_size_length + 6) + '\n'

0 commit comments

Comments
 (0)