summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-06 22:00:21 +0200
committerDavid Robillard <d@drobilla.net>2020-08-07 01:30:23 +0200
commit42f8a3ad0941661cebb6dbb9edbad7d4f7252421 (patch)
treefab515b59918ae4beade6192d6d7984dbc83dbeb /src
parent18eba7b656ab19e27c2351e63a9990b570417b8f (diff)
downloadlilv-42f8a3ad0941661cebb6dbb9edbad7d4f7252421.tar.gz
lilv-42f8a3ad0941661cebb6dbb9edbad7d4f7252421.tar.bz2
lilv-42f8a3ad0941661cebb6dbb9edbad7d4f7252421.zip
Fix error handling when copying files
Diffstat (limited to 'src')
-rw-r--r--src/filesystem.c4
1 files changed, 4 insertions, 0 deletions
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;
}