diff --git a/builtin-fsck.c b/builtin-fsck.c
index e077e72dea94892e2f74ddd6be528b02bc6ccea4..b3d38fa277b3d0024b9c46a62cf15bc2448cc1e7 100644 (file)
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
return;
}
if (!(f = fopen(filename, "w")))
- die("Could not open %s", filename);
+ die_errno("Could not open '%s'", filename);
if (obj->type == OBJ_BLOB) {
enum object_type type;
unsigned long size;
&type, &size);
if (buf) {
if (fwrite(buf, size, 1, f) != 1)
- die("Could not write %s: %s",
- filename, strerror(errno));
+ die_errno("Could not write '%s'",
+ filename);
free(buf);
}
} else
fprintf(f, "%s\n", sha1_to_hex(obj->sha1));
if (fclose(f))
- die("Could not finish %s: %s",
- filename, strerror(errno));
+ die_errno("Could not finish '%s'",
+ filename);
}
return;
}