aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2024-12-30 14:28:34 -0500
committerGitHub <noreply@github.com>2024-12-30 14:28:34 -0500
commitf64f82bc6a1aec53a924d21deb65a60da1020d0e (patch)
tree1d3eb2e68f6b05556adfe349f2ae794a1eb30969 /src
parentfacbd1473fd1914d7c2e702a3de2227bd7b4bfe1 (diff)
parent6d0abd904b642ffd531e7543170ab9c309b65f91 (diff)
downloadstasis-f64f82bc6a1aec53a924d21deb65a60da1020d0e.tar.gz
Merge pull request #81 from jhunkeler/fix-index-junitxml-report
indexer: Truncate the basename of the xml file only when an extension is present
Diffstat (limited to 'src')
-rw-r--r--src/cli/stasis_indexer/junitxml_report.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cli/stasis_indexer/junitxml_report.c b/src/cli/stasis_indexer/junitxml_report.c
index 65ec4f5..d7d8f9a 100644
--- a/src/cli/stasis_indexer/junitxml_report.c
+++ b/src/cli/stasis_indexer/junitxml_report.c
@@ -29,7 +29,9 @@ static int write_report_output(struct Delivery *ctx, FILE *destfp, const char *x
char *bname_tmp = strdup(xmlfilename);
char *bname = path_basename(bname_tmp);
- bname[strlen(bname) - 4] = 0;
+ if (endswith(bname, ".xml")) {
+ bname[strlen(bname) - 4] = 0;
+ }
guard_free(bname_tmp);
char result_outfile[PATH_MAX] = {0};