From 9dd94df4f79ffd0154b471534536036819624421 Mon Sep 17 00:00:00 2001 From: AZero13 Date: Mon, 8 Dec 2025 20:49:21 -0500 Subject: [PATCH] Change condition to be < 0 This is so it matches the documentation of fcopyfile --- Sources/FoundationEssentials/FileManager/FileOperations.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/FoundationEssentials/FileManager/FileOperations.swift b/Sources/FoundationEssentials/FileManager/FileOperations.swift index 1c28880ac..f5854e225 100644 --- a/Sources/FoundationEssentials/FileManager/FileOperations.swift +++ b/Sources/FoundationEssentials/FileManager/FileOperations.swift @@ -1083,7 +1083,7 @@ enum _FileOperations { defer { close(dstFD) } #if canImport(Darwin) - if fcopyfile(srcFD, dstFD, nil, copyfile_flags_t(COPYFILE_METADATA | COPYFILE_NOFOLLOW | extraFlags)) != 0 { + if fcopyfile(srcFD, dstFD, nil, copyfile_flags_t(COPYFILE_METADATA | COPYFILE_NOFOLLOW | extraFlags)) < 0 { try delegate.throwIfNecessary(errno, String(cString: src), String(cString: dst)) } #else