From 78944c815a5d8d1c93771ca1c343b9406bc262c4 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 26 Sep 2021 15:23:26 -0400 Subject: Don't truncate files until we know they're not duplicates --- util.c | 1 + 1 file changed, 1 insertion(+) (limited to 'util.c') diff --git a/util.c b/util.c index 728f962..2780447 100644 --- a/util.c +++ b/util.c @@ -443,6 +443,7 @@ FILE *xfopen(const char *path, int flags) { break; default: assert(!"Invalid access mode"); + errno = EINVAL; return NULL; } -- cgit v1.2.3