summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2021-09-26 15:23:26 -0400
committerTavian Barnes <tavianator@tavianator.com>2021-09-26 15:23:26 -0400
commit78944c815a5d8d1c93771ca1c343b9406bc262c4 (patch)
tree0e11144b526a3a1cebeedf4f7277b60d40488580 /util.c
parent2e918d33be152c1a57ffb3ff53e344cafb161a8c (diff)
downloadbfs-78944c815a5d8d1c93771ca1c343b9406bc262c4.tar.xz
Don't truncate files until we know they're not duplicates
Diffstat (limited to 'util.c')
-rw-r--r--util.c1
1 files changed, 1 insertions, 0 deletions
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;
}