Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd55e11b

Browse files
authored
gh-76023: Make os.path.realpath to ignore WinError 1005 in non-strict mode (GH-128328)
1 parentd6dc33e commitd55e11b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

‎Lib/ntpath.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,9 +661,10 @@ def _getfinalpathname_nonstrict(path):
661661
# 87: ERROR_INVALID_PARAMETER
662662
# 123: ERROR_INVALID_NAME
663663
# 161: ERROR_BAD_PATHNAME
664+
# 1005: ERROR_UNRECOGNIZED_VOLUME
664665
# 1920: ERROR_CANT_ACCESS_FILE
665666
# 1921: ERROR_CANT_RESOLVE_FILENAME (implies unfollowable symlink)
666-
allowed_winerror=1,2,3,5,21,32,50,53,65,67,87,123,161,1920,1921
667+
allowed_winerror=1,2,3,5,21,32,50,53,65,67,87,123,161,1005,1920,1921
667668

668669
# Non-strict algorithm is to find as much of the target directory
669670
# as we can and join the rest.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Make:func:`os.path.realpath` ignore Windows error 1005 when in non-strict mode.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp