Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add underscore prefix
  • Loading branch information
barneygale committed Jun 19, 2024
commit de5a23033531d06b5bc2dfaef658b02ed6a38ff6
4 changes: 2 additions & 2 deletions Lib/pathlib/_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def copyfd(source_fd, target_fd):


if _winapi and hasattr(_winapi, 'CopyFile2') and hasattr(os.stat_result, 'st_file_attributes'):
def is_dirlink(path):
def _is_dirlink(path):
try:
st = os.lstat(path)
except (OSError, ValueError):
Expand All @@ -114,7 +114,7 @@ def copyfile(source, target, follow_symlinks):
return
except OSError as err:
# Check for ERROR_ACCESS_DENIED
if err.winerror != 5 or not is_dirlink(source):
if err.winerror != 5 or not _is_dirlink(source):
raise
flags |= _winapi.COPY_FILE_DIRECTORY
_winapi.CopyFile2(source, target, flags)
Expand Down