Accept EINVAL result from copy_file_range.

Apparently, ecryptfs can give this result for regular files.

For #5769.
This commit is contained in:
Esme Povirk 2022-04-18 11:14:03 -05:00 committed by Arkadiusz Hiler
parent b62efa6a4e
commit 1e39d5838c

2
proton
View File

@ -223,7 +223,7 @@ def copyfile_reflink(srcname, dstname):
while bytes_to_copy > 0:
bytes_to_copy -= copy_file_range(src.fileno(), dst.fileno(), bytes_to_copy)
except OSError as e:
if e.errno != errno.EXDEV and e.errno != errno.ENOSYS:
if e.errno not in (errno.EXDEV, errno.ENOSYS, errno.EINVAL):
raise e
if e.errno == errno.ENOSYS:
copyfile = shutil.copyfile