aboutsummaryrefslogtreecommitdiff
path: root/src/msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/msg.c')
-rw-r--r--src/msg.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/msg.c b/src/msg.c
index fc385b8..5e6092e 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -49,9 +49,13 @@ handle_file(const char *path)
char *dot = strrchr(inpath, '.');
if (dot && strcmp(dot, ".md") == 0) {
- asprintf(&outpath, "%s/%.*s.html", OUTPUT, (int) strlen(path) - 3, path);
+ asprintf(&outpath,
+ "%s/%.*s.html",
+ msg->output_directory,
+ (int) strlen(path) - 3,
+ path);
} else {
- asprintf(&outpath, "%s/%s", OUTPUT, path);
+ asprintf(&outpath, "%s/%s", msg->output_directory, path);
}
char *temp_outpath = strdup(outpath);
@@ -118,7 +122,7 @@ run(void)
base_template = template_create();
- int err = mkdir(OUTPUT, 0700);
+ int err = mkdir(msg->output_directory, 0700);
if (err != 0 && errno != EEXIST) {
perror("mkdir");
return EXIT_FAILURE;