mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
add a warning if newlines are detected in naked ls
This commit is contained in:
@ -236,6 +236,7 @@ def parse(data, raw=False, quiet=False):
|
||||
# Pop following total line
|
||||
linedata.pop(0)
|
||||
|
||||
warned = False
|
||||
new_section = False
|
||||
|
||||
if linedata:
|
||||
@ -301,6 +302,10 @@ def parse(data, raw=False, quiet=False):
|
||||
next_is_parent = False
|
||||
continue
|
||||
|
||||
if not quiet and next_is_parent and not entry.endswith(':') and not warned:
|
||||
jc.utils.warning_message('Newline characters detected. Filenames probably corrupted. Use ls -l instead.')
|
||||
warned = True
|
||||
|
||||
output_line['filename'] = entry
|
||||
|
||||
if parent:
|
||||
|
Reference in New Issue
Block a user