aboutsummaryrefslogtreecommitdiff
path: root/src/lib/delivery
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2026-05-07 15:54:00 -0400
committerGitHub <noreply@github.com>2026-05-07 15:54:00 -0400
commit0ef06cbec6f3796db244501b4c5fec2d579c7e5b (patch)
tree675651a16986ebfc1473102d9ce6d7187fc107d0 /src/lib/delivery
parentb494ddd036f9b17fcfabd42decd325bbe8be914e (diff)
parent9468c81718046af0a0b32c492bee359a98e2e8e9 (diff)
downloadstasis-0ef06cbec6f3796db244501b4c5fec2d579c7e5b.tar.gz
Merge pull request #141 from jhunkeler/use-stasis-bufsiz
Replace BUFSIZ with STASIS_BUFSIZ
Diffstat (limited to 'src/lib/delivery')
-rw-r--r--src/lib/delivery/delivery_init.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/delivery/delivery_init.c b/src/lib/delivery/delivery_init.c
index ec05a0f..024815b 100644
--- a/src/lib/delivery/delivery_init.c
+++ b/src/lib/delivery/delivery_init.c
@@ -294,10 +294,18 @@ int delivery_init(struct Delivery *ctx, int render_mode) {
char config_local[PATH_MAX];
snprintf(config_local, sizeof(config_local), "%s/%s", ctx->storage.tmpdir, "config");
setenv("XDG_CONFIG_HOME", config_local, 1);
+ if (mkdirs(config_local, 0755)) {
+ SYSERROR("%s: unable to create directory", config_local);
+ // fall through because XDG doesn't _really_ need to be there
+ }
char cache_local[PATH_MAX];
snprintf(cache_local, sizeof(cache_local), "%s/%s", ctx->storage.tmpdir, "cache");
setenv("XDG_CACHE_HOME", cache_local, 1);
+ if (mkdirs(cache_local, 0755)) {
+ SYSERROR("%s: unable to create directory", cache_local);
+ // fall through because XDG doesn't _really_ need to be there
+ }
// add tools to PATH
char pathvar_tmp[STASIS_BUFSIZ];