diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-05-31 02:52:43 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-05-31 02:52:43 +0200 |
commit | 4ab4c1d0ba31d437e05792719fba664a94521819 (patch) | |
tree | 953bf2925e1c96f95be28132a5459b82bd5a51bf /src/blogc-git-receiver/pre-receive.c | |
parent | 56e07b6224fce7e213bfb9b4d00b93628a50aca7 (diff) | |
download | blogc-4ab4c1d0ba31d437e05792719fba664a94521819.tar.gz blogc-4ab4c1d0ba31d437e05792719fba664a94521819.tar.bz2 blogc-4ab4c1d0ba31d437e05792719fba664a94521819.zip |
git-receiver: allow users to define builds dir
Diffstat (limited to 'src/blogc-git-receiver/pre-receive.c')
-rw-r--r-- | src/blogc-git-receiver/pre-receive.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/blogc-git-receiver/pre-receive.c b/src/blogc-git-receiver/pre-receive.c index 897e8f0..9611567 100644 --- a/src/blogc-git-receiver/pre-receive.c +++ b/src/blogc-git-receiver/pre-receive.c @@ -199,15 +199,16 @@ default_sym: goto cleanup; } - const char *bd = bgr_settings_get_basedir(); - if (bd == NULL) { - fprintf(stderr, "error: failed to find user base directory path\n"); + char *buildsd = bgr_settings_get_builds_dir(); + if (buildsd == NULL) { + fprintf(stderr, "error: failed to find builds directory path\n"); rv = 3; goto cleanup; } unsigned long epoch = time(NULL); - output_dir = bc_strdup_printf("%s/builds/%s-%lu", bd, master, epoch); + output_dir = bc_strdup_printf("%s/%s-%lu", buildsd, master, epoch); + free(buildsd); if (0 == access(output_dir, F_OK)) { char *tmp = output_dir; |