Skip to content

Commit 5513240

Browse files
committed
copy_file_range: fallback in case of EXDEV
1 parent c581535 commit 5513240

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libpkg/utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ copy_file(int from, int to)
902902
if (cfr) {
903903
r = copy_file_range(from, NULL, to, NULL, SSIZE_MAX,
904904
0);
905-
if (r < 0 && errno == EINVAL) {
905+
if (r < 0 && (errno == EINVAL || errno == EXDEV)) {
906906
/* probably a non seekable FD */
907907
cfr = false;
908908
}

0 commit comments

Comments
 (0)