From 7c061ae7c293de0b52bad6a9d51a326005c4395c Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Thu, 15 Aug 2024 10:04:56 -0400 Subject: indexer: Handle destination directories more gracefully (#28) * Handle destination directories more gracefully * The storage.output_dir is now the storage.root to avoid generating a sub-directory beneath the temporary working directory * The destination directory is created, then resolved by realpath to avoid generating the destination directory within the temporary working directory when a relative path is used as input * Replace the original file instead of using rename() * rename() cannot operate across file system boundaries * Dynamically allocate rootdirs array * Use realpath on positional arguments * Convert all markdown files to HTML * README.html files are considered entry points and are linked as index.html * Assign retcode after indexing --- tests/rt_generic.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/rt_generic.sh b/tests/rt_generic.sh index df39dbd..fced08e 100644 --- a/tests/rt_generic.sh +++ b/tests/rt_generic.sh @@ -69,6 +69,7 @@ pushd "$ws" logfile="stasis_indexer.log" set -x stasis_indexer --web --unbuffered -v stasis/* 2>&1 | tee "$logfile" + retcode=$? set +x find output @@ -79,7 +80,6 @@ pushd "$ws" exit 1 fi done - popd rm -rf "$ws" -- cgit