From 761ac9e83cf74e0e7a16b2b8c70cbc14a93ec08d Mon Sep 17 00:00:00 2001 From: Esme Povirk Date: Mon, 18 Apr 2022 11:14:03 -0500 Subject: [PATCH] Accept EINVAL result from copy_file_range. Apparently, ecryptfs can give this result for regular files. For #5769. --- proton | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proton b/proton index 63ec2368..ee8f7070 100755 --- a/proton +++ b/proton @@ -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