From 1e39d5838c8524988babf61f1173bab064f9fb3d 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 e1a0dff4..da8282df 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