From 74eedada0bf0351d484caaf7d82d90cfdce0b537 Mon Sep 17 00:00:00 2001 From: komaruworld Date: Fri, 9 Oct 2026 00:45:05 +0300 Subject: [PATCH] improve evilbsd support Netbsd hi --- src/update/payload_store.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/update/payload_store.cc b/src/update/payload_store.cc index fd389c4..1f36edc 100644 --- a/src/update/payload_store.cc +++ b/src/update/payload_store.cc @@ -297,7 +297,10 @@ bool CloneOrCopyFile(const std::filesystem::path& source, } bool copied = false; #if defined(__linux__) && defined(FICLONE) - copied = ioctl(output, FICLONE, input) == 0; + struct stat cloned_metadata = {}; + copied = ioctl(output, FICLONE, input) == 0 && + fstat(output, &cloned_metadata) == 0 && + cloned_metadata.st_size == metadata.st_size; #endif #if defined(__linux__) if (!copied) {