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:
@ -259,6 +259,11 @@ def parse(data, raw=False, quiet=False):
|
|||||||
new_section = False
|
new_section = False
|
||||||
continue
|
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
|
# fixup for filenames with newlines
|
||||||
if not new_section \
|
if not new_section \
|
||||||
and not re.match(r'[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', entry):
|
and not re.match(r'[-dclpsbDCMnP?]([-r][-w][-xsS]){2}([-r][-w][-xtT])[+]?', entry):
|
||||||
|
Reference in New Issue
Block a user