diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-12-06 08:31:35 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-12-06 08:31:35 -0500 |
commit | 9788c4ffe8a75d1a10ff0bdc5d382b5e7f1cd70b (patch) | |
tree | f3c3fd9b3fa5e66e5f6ce67edfccfad888a5fe7c | |
parent | 3336bb1399e83f10717dcad6fbbf949727a51532 (diff) | |
download | stasis-9788c4ffe8a75d1a10ff0bdc5d382b5e7f1cd70b.tar.gz |
Scan the directories listed in `dirs` instead of just the delivery directory
-rw-r--r-- | src/cli/stasis_indexer/website.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cli/stasis_indexer/website.c b/src/cli/stasis_indexer/website.c index cf5f3c2..9fa7b57 100644 --- a/src/cli/stasis_indexer/website.c +++ b/src/cli/stasis_indexer/website.c @@ -18,11 +18,12 @@ int indexer_make_website(const struct Delivery *ctx) { struct StrList *inputs = NULL; for (size_t i = 0; i < strlist_count(dirs); i++) { const char *pattern = "*.md"; - if (get_files(&inputs, ctx->storage.delivery_dir, pattern)) { - SYSERROR("%s does not contain files with pattern: %s", ctx->storage.delivery_dir, pattern); - guard_strlist_free(&inputs); + char *dirpath = strlist_item(dirs, i); + if (get_files(&inputs, dirpath, pattern)) { + SYSERROR("%s does not contain files with pattern: %s", dirpath, pattern); continue; } + char *root = strlist_item(dirs, i); for (size_t x = 0; x < strlist_count(inputs); x++) { char cmd[PATH_MAX] = {0}; |