diff options
author | June McEnroe <june@causal.agency> | 2021-10-05 23:16:32 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-10-05 23:30:09 -0400 |
commit | fa944345a63a083555a1f1933aabf4ea6f27a307 (patch) | |
tree | 37a053122b20d4c306013911cb022b000cecf0b6 /bounce.c | |
parent | Load and reload local certificates like normal (diff) | |
download | pounce-fa944345a63a083555a1f1933aabf4ea6f27a307.tar.gz pounce-fa944345a63a083555a1f1933aabf4ea6f27a307.zip |
Refactor XDG base directory iterator API
Finally something more reasonable for call sites.
Diffstat (limited to '')
-rw-r--r-- | bounce.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bounce.c b/bounce.c index 7f0add5..12cacf5 100644 --- a/bounce.c +++ b/bounce.c @@ -139,10 +139,10 @@ static void unveilTarget(const char *path, const char *mode) { } static void unveilConfig(const char *path) { - const char *dirs = NULL; - for (const char *abs; NULL != (abs = configPath(&dirs, path));) { - unveilParent(abs, "r"); - unveilTarget(abs, "r"); + char buf[PATH_MAX]; + for (int i = 0; configPath(buf, sizeof(buf), path, i); ++i) { + unveilParent(buf, "r"); + unveilTarget(buf, "r"); } } #endif /* __OpenBSD__ */ |