From 4da928cada36fcabf4f0c9138ade0beef7bf92e4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Fri, 6 Dec 2024 08:31:56 -0500 Subject: Take the basename of the file immediately from the StrList item --- src/cli/stasis_indexer/website.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/cli/stasis_indexer/website.c') diff --git a/src/cli/stasis_indexer/website.c b/src/cli/stasis_indexer/website.c index 9fa7b57..55f0c45 100644 --- a/src/cli/stasis_indexer/website.c +++ b/src/cli/stasis_indexer/website.c @@ -26,8 +26,7 @@ int indexer_make_website(const struct Delivery *ctx) { char *root = strlist_item(dirs, i); for (size_t x = 0; x < strlist_count(inputs); x++) { - char cmd[PATH_MAX] = {0}; - char *filename = strlist_item(inputs, x); + char *filename = path_basename(strlist_item(inputs, x)); char fullpath_src[PATH_MAX] = {0}; char fullpath_dest[PATH_MAX] = {0}; sprintf(fullpath_src, "%s/%s", root, filename); -- cgit