aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/blogc-make/ctx.c')
-rw-r--r--src/blogc-make/ctx.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/blogc-make/ctx.c b/src/blogc-make/ctx.c
index 62b40b8..ff825e1 100644
--- a/src/blogc-make/ctx.c
+++ b/src/blogc-make/ctx.c
@@ -215,11 +215,11 @@ bm_ctx_new(bm_ctx_t *base, const char *settings_file, const char *argv0,
}
-void
+bool
bm_ctx_reload(bm_ctx_t *ctx)
{
if (ctx == NULL || ctx->settings_fctx == NULL)
- return;
+ return false;
if (bm_filectx_changed(ctx->settings_fctx, NULL)) {
// reload everything! we could just reload settings_fctx, as this
@@ -231,11 +231,12 @@ bm_ctx_reload(bm_ctx_t *ctx)
bc_error_t *err = NULL;
ctx = bm_ctx_new(ctx, tmp, NULL, &err);
free(tmp);
- if (err != NULL) { // failed to reload, keep old ctx
+ if (err != NULL) {
bc_error_print(err, "blogc-make");
bc_error_free(err);
+ return false;
}
- return;
+ return true;
}
bm_filectx_reload(ctx->main_template_fctx);
@@ -249,6 +250,8 @@ bm_ctx_reload(bm_ctx_t *ctx)
for (bc_slist_t *tmp = ctx->copy_fctx; tmp != NULL; tmp = tmp->next)
bm_filectx_reload((bm_filectx_t*) tmp->data);
+
+ return true;
}