One function
_search_paths in fabiocaccamo/python-fsutil
The author described this change as “Fix search methods not working correctly with relative paths.”. It counts as a record because the check below fails on the code as it stood at 7121d4a0f and passes on 84b605510, with nothing else changed between the two runs.
Projectfabiocaccamo/python-fsutil
Fix saved2026-04-07
Sharing licenceMIT · LICENSE.txt
Change size+3 −1
What the code was meant to do, written into the code itself as a docstring
Search all paths relative to path matching the given pattern.
The change
| 7 | 7 | pathname = os.path.join(path, pattern) | |
| 8 | 8 | paths = glob.glob(pathname, recursive=True) | |
| 9 | 9 | # normalize paths to use OS-specific separators | |
| 10 | - | paths = [os.path.normpath(path_result) for path_result in paths] | |
| 10 | + | paths = [ | |
| 11 | + | os.path.relpath(os.path.normpath(path_result), path) for path_result in paths | |
| 12 | + | ] | |
| 11 | 13 | return paths |
The check that tells the two apart
fail→pass·tests/test_operations.py::test_search_files_with_relative_path
Check file tests/test_operations.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 it7121d4a0fbeb73e2a1625e80031e3a7dfe552d83
Broken version dated2026-01-09
Modulefsutil.operations
Units changed_search_paths
Fingerprint17d7d4e46d5fb87b
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 fabiocaccamo/python-fsutil
- 2026-07-07convert_size_bytes_to_string
- 2024-05-16join_path
- 2023-12-19Fix permissions lost when using `write_file` with `atomic=True`. #94
- 2023-01-11make_dirs_for_file