From 42f8a3ad0941661cebb6dbb9edbad7d4f7252421 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 6 Aug 2020 22:00:21 +0200 Subject: Fix error handling when copying files --- src/filesystem.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/filesystem.c b/src/filesystem.c index e610d07..7cda4d9 100644 --- a/src/filesystem.c +++ b/src/filesystem.c @@ -272,6 +272,10 @@ lilv_copy_file(const char* src, const char* dst) } } + if (!st && fflush(out)) { + st = errno; + } + if (!st && (ferror(in) || ferror(out))) { st = EBADF; } -- cgit v1.2.1