Skip to content

gh-82814: fix shutil access error on WSL #103790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Lib/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def _copyxattr(src, dst, *, follow_symlinks=True):
os.setxattr(dst, name, value, follow_symlinks=follow_symlinks)
except OSError as e:
if e.errno not in (errno.EPERM, errno.ENOTSUP, errno.ENODATA,
errno.EINVAL):
errno.EINVAL, errno.EACCES):
raise
else:
def _copyxattr(*args, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix a potential ``[Errno 13] Permission denied`` when using :func:`shutil.copystat`
within Windows Subsystem for Linux (WSL) on a mounted filesystem by adding
``errno.EACCES`` to the list of ignored errors within the internal implementation.