1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-21 00:19:42 +02:00

fix for osx - doesn't print 'total xx' line if empty directory (issue #40)

This commit is contained in:
Kelly Brazil
2020-03-07 17:22:08 -08:00
parent 5249c972ae
commit 1e22f610a3

View File

@ -259,6 +259,11 @@ def parse(data, raw=False, quiet=False):
new_section = False
continue
# fix for OSX - doesn't print 'total xx' line if empty directory
if new_section and entry == '':
new_section = False
continue
# fixup for filenames with newlines
if not new_section \
and not re.match(r'[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', entry):