One function

parse in kellyjonbrazil/jc

The author described this change as Fix dir parser stripping D: drive letter from parent directory path. It counts as a record because the check below fails on the code as it stood at 585ff83a2 and passes on 128e36404, with nothing else changed between the two runs.

Fix saved2026-03-25
Sharing licenceMIT · LICENSE.md
Change size+2 2

What the code was meant to do, written into the code itself as a docstring

Main text parsing function Parameters: data: (string) text data to parse raw: (boolean) unprocessed output if True quiet: (boolean) suppress warning messages if True Returns: List of Dictionaries. Raw or processed structured data.

The change

2020 if jc.utils.has_data(data):
2121
2222 for line in data.splitlines():
23- if line.startswith(" Directory of"):
24- parent_dir = line.lstrip(" Directory of ")
23+ if line.startswith(" Directory of "):
24+ parent_dir = line[len(" Directory of "):]
2525 continue
2626 # skip lines that don't start with a date
2727 if not re.match(r'^\d{2}/\d{2}/\d{4}', line):

The check that tells the two apart

failpass·tests/test_dir.py::MyTests::test_dir_drive_letter_d

Check file tests/test_dir.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it585ff83a2e97f58427df10a04f699603ebc065a0
Broken version dated2026-03-16
Modulejc.parsers.dir
Units changedparse
Fingerprint419aee2ce03a23d5
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in kellyjonbrazil/jc