diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/msg.c | 1 | ||||
-rw-r--r-- | src/template.c | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -152,6 +152,7 @@ run(void) struct stat path_stat; stat(path, &path_stat); + /* TODO: Error handling */ if (S_ISREG(path_stat.st_mode)) copy_recursively(path, NULL, FTW_F, NULL); else if (S_ISDIR(path_stat.st_mode)) diff --git a/src/template.c b/src/template.c index 960ebc6..73b21e4 100644 --- a/src/template.c +++ b/src/template.c @@ -22,8 +22,8 @@ #include <engine.h> #include <filehandler.h> #include <lexer.h> -#include <msg.h> #include <mkdio.h> +#include <msg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -37,7 +37,7 @@ template_create(void) template_t *template = malloc(sizeof(template_t)); char *path; - asprintf(&path, "%s/%s", msg->base_directory, BASE_TEMPLATE); + asprintf(&path, "%s/%s/%s", msg->base_directory, TEMPLATES, BASE_TEMPLATE); FILE *base = fopen(path, "r"); free(path); |