From 9ff87189278a250dfc7e49764a9642e93fcbfb65 Mon Sep 17 00:00:00 2001 From: Marat Radchenko Date: Sun, 12 Nov 2023 21:33:02 +0300 Subject: [PATCH] Fix cross-device copy failing on macOS Downstream issue: https://github.com/macOScontainers/rund/issues/28 Signed-off-by: Marat Radchenko --- copy/copy_darwin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copy/copy_darwin.go b/copy/copy_darwin.go index bc93b21c..0cdc00a8 100644 --- a/copy/copy_darwin.go +++ b/copy/copy_darwin.go @@ -13,7 +13,7 @@ import ( func copyFile(source, target string) error { if err := unix.Clonefileat(unix.AT_FDCWD, source, unix.AT_FDCWD, target, unix.CLONE_NOFOLLOW); err != nil { - if err != unix.EINVAL { + if err != unix.EINVAL && err != unix.EXDEV { return err } } else {