mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
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.
This commit is contained in:
parent
089835469d
commit
f09d184821
6 changed files with 40 additions and 29 deletions
|
@ -5,7 +5,8 @@ import errno
|
|||
import stat
|
||||
import unittest
|
||||
|
||||
from pathlib._abc import UnsupportedOperation, ParserBase, PurePathBase, PathBase
|
||||
from pathlib._os import UnsupportedOperation
|
||||
from pathlib._abc import ParserBase, PurePathBase, PathBase
|
||||
import posixpath
|
||||
|
||||
from test.support import is_wasi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue