]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-73991: Support copying directory symlinks on older Windows (#120807)
authorBarney Gale <barney.gale@gmail.com>
Wed, 3 Jul 2024 03:30:29 +0000 (04:30 +0100)
committerGitHub <noreply@github.com>
Wed, 3 Jul 2024 03:30:29 +0000 (04:30 +0100)
commitf09d184821efd9438d092643881e28bdf8de4de5
tree1aa17585a9a686154135ef1f9305c0a4a5984234
parent089835469d5efbea4793cd611b43cb8387f2e7e5
GH-73991: Support copying directory symlinks on older Windows (#120807)

Check for `ERROR_INVALID_PARAMETER` when calling `_winapi.CopyFile2()` and
raise `UnsupportedOperation`. In `Path.copy()`, handle this exception and
fall back to the `PathBase.copy()` implementation.
Doc/library/pathlib.rst
Lib/pathlib/__init__.py
Lib/pathlib/_abc.py
Lib/pathlib/_local.py
Lib/pathlib/_os.py
Lib/test/test_pathlib/test_pathlib_abc.py