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.

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

88 basepath = path
99 if get_file_extension(path) in ["py", "pyc", "pyo"]:
1010 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]
1212 return os.path.normpath(os.path.join(basepath, *paths_str))

The check that tells the two apart

failpass·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