You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2021-12-07.20:24:16.226>created_at=<Date2019-05-08.07:43:31.727>labels= ['3.7', '3.8', 'type-bug', 'library']
title='shutil.copy2 fails with even with source network filesystem not supporting extended attributes'updated_at=<Date2021-12-07.20:24:16.225>user='https://bugs.python.org/hans-meine'
This is a near duplicate of bpo-24564, but has a slightly smaller scope.
We're using a CIFS filesystem and noticed that copying files from that filesystem to a local path with shutil.copy2 does not work, but fails with an OSError: [Errno 22] Invalid argument. This is because copy2() calls copystat() which contains
try:
names = os.listxattr(src, follow_symlinks=follow_symlinks)
except OSError as e:
if e.errno not in (errno.ENOTSUP, errno.ENODATA):
raise
In our case with our CIFS mount, and in the NFS mounts mentioned in bpo-24564, os.listxattr() raises an IOError with errno.EINVAL (22). It was proposed in bpo-24564 already to also ignore EINVAL, but with this issue I wanted to specifically propose to do so for the reading part. While I also think that copy2() should work with both source and target filesystems not supporting xattr, our use case where the likelihood of data loss is zero (because there have never been xattr in the first place) is particularly annoying.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: