stagit

git site generator
Contents

more verbose errors: show which file failed on open

Hiltjo Posthuma hiltjo@codemadness.org

commit: a04bb67 parent: b22c156
1 files changed, 2 insertions(+), 2 deletions(-)
Mstagit.c+2-2
M · stagit.c +2, -2
 1@@ -223,7 +223,7 @@ efopen(const char *name, const char *flags)
 2 FILE *fp;
 3
 4 if (!(fp =
fopen(name, flags)))
 5- err(1, "fopen");
 6+ err(1,
"fopen: '%s'", name);
 7
 8 return fp;
 9 }
10@@ -1115,7 +1115,7 @@ main(int argc, char *argv[])
11 if ((fd = mkstemp(tmppath)) == -1)
12 err(1,
"mkstemp");
13 if (!(wcachefp =
fdopen(fd, "w")))
14- err(1, "fdopen");
15+ err(1,
"fdopen: '%s'", tmppath);
16 /* write last commit id (HEAD) */
17
git_oid_tostr(buf, sizeof(buf), head);
18 fprintf(wcachefp,
"%s\n", buf);