~mdw
/
sgt
/
agedu
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
I promised in the docs that the HTML output directory would be
[sgt/agedu]
/
agedu.c
diff --git
a/agedu.c
b/agedu.c
index
463104f
..
a8269a9
100644
(file)
--- a/
agedu.c
+++ b/
agedu.c
@@
-1369,9
+1369,14
@@
int main(int argc, char **argv)
*/
int dirlen = outfile ? 2+strlen(outfile) : 3;
char prefix[dirlen];
*/
int dirlen = outfile ? 2+strlen(outfile) : 3;
char prefix[dirlen];
- if (outfile)
+ if (outfile) {
+ if (mkdir(outfile, 0777) < 0 && errno != EEXIST) {
+ fprintf(stderr, "%s: %s: mkdir: %s\n", PNAME,
+ outfile, strerror(errno));
+ return 1;
+ }
snprintf(prefix, dirlen, "%s/", outfile);
snprintf(prefix, dirlen, "%s/", outfile);
- else
+
}
else
snprintf(prefix, dirlen, "./");
unsigned long xi2;
snprintf(prefix, dirlen, "./");
unsigned long xi2;