One function
join_path in fabiocaccamo/python-fsutil
The author described this change as “Fix `join_path` with absolute paths on Windows.”. It counts as a record because the check below fails on the code as it stood at 1352ee635 and passes on b278e8ee4, with nothing else changed between the two runs.
Projectfabiocaccamo/python-fsutil
Fix saved2024-05-16
Sharing licenceMIT · LICENSE.txt
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
Create a path joining path and paths. If path is __file__ (or a .py file), the resulting path will be relative to the directory path of the module in which it's used.
The change
| 8 | 8 | basepath = path | |
| 9 | 9 | if get_file_extension(path) in ["py", "pyc", "pyo"]: | |
| 10 | 10 | basepath = os.path.dirname(os.path.realpath(path)) | |
| 11 | - | paths_str = [_get_path(path).lstrip(os.sep) for path in paths] | |
| 11 | + | paths_str = [_get_path(path).lstrip("/\\") for path in paths] | |
| 12 | 12 | return os.path.normpath(os.path.join(basepath, *paths_str)) |
The check that tells the two apart
fail→pass·tests/test.py::fsutil_test_case::test_join_path_with_absolute_path_on_windows
Check file tests/test.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 it1352ee6351437d80c07fc3e40c9914dd282acd8b
Broken version dated2024-05-14
Modulefsutil.__init__
Units changedjoin_path
Fingerprint014f50dc670bf55a
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
- 2026-04-07_search_paths
- 2023-12-19Fix permissions lost when using `write_file` with `atomic=True`. #94
- 2023-01-11make_dirs_for_file