mirror of
https://github.com/InstanceBrick/nightcap.git
synced 2026-10-17 16:01:38 +02:00
improve evilbsd support
Netbsd hi
This commit is contained in:
1 parent
cb2e9dd598
commit
74eedada0b
1 file changed
+4
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user