diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-11 10:27:24 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-11 10:27:24 +0300 |
| commit | 0965e395edc7c12db340c2f44debfe15a441ee62 (patch) | |
| tree | 5c95df723652036b4782cdcf9b7451a7de811aa5 | |
| parent | a15b71282edce7e32a27b6ef84a06a9b1a853ab5 (diff) | |
Fix detail redirect dry-run count
| -rwxr-xr-x | bin/photoalbum | 2 | ||||
| -rw-r--r-- | src/lib/album.source.sh | 2 | ||||
| -rwxr-xr-x | tests/cli.sh | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/bin/photoalbum b/bin/photoalbum index 0fc3912..f6d2b7e 100755 --- a/bin/photoalbum +++ b/bin/photoalbum @@ -2248,7 +2248,7 @@ dry_run() { if (( image_count > 0 )); then details_count=$image_count page_count=$(( (image_count + MAXPREVIEWS - 1) / MAXPREVIEWS )) - redirect_count=$(( page_count * 4 + 1 )) + redirect_count=$(( page_count * 4 + 2 )) fi printf 'Dry run: no files will be written.\n' diff --git a/src/lib/album.source.sh b/src/lib/album.source.sh index ee693e0..760201a 100644 --- a/src/lib/album.source.sh +++ b/src/lib/album.source.sh @@ -950,7 +950,7 @@ dry_run() { if (( image_count > 0 )); then details_count=$image_count page_count=$(( (image_count + MAXPREVIEWS - 1) / MAXPREVIEWS )) - redirect_count=$(( page_count * 4 + 1 )) + redirect_count=$(( page_count * 4 + 2 )) fi printf 'Dry run: no files will be written.\n' diff --git a/tests/cli.sh b/tests/cli.sh index 540065b..93586a8 100755 --- a/tests/cli.sh +++ b/tests/cli.sh @@ -1670,7 +1670,7 @@ test_dry_run_reports_cli_overrides_without_writes() { " $dist_dir/[page]-[image]-details.html (6 details pages)" \ "$output" test::assert_contains \ - " $dist_dir/[redirect].html (13 navigation redirects)" \ + " $dist_dir/[redirect].html (14 navigation redirects)" \ "$output" test::assert_not_contains "$dist_dir/html" "$output" test::assert_contains " $dist_dir/incoming-<timestamp>.tar" "$output" |
