Skip to content

hts_finish_html_file is documented as skipping unchanged writes, and does not - #764

Merged
xroche merged 1 commit into
masterfrom
fix/htscore-doc-727
Jul 27, 2026
Merged

hts_finish_html_file is documented as skipping unchanged writes, and does not#764
xroche merged 1 commit into
masterfrom
fix/htscore-doc-727

Conversation

@xroche

@xroche xroche commented Jul 27, 2026

Copy link
Copy Markdown
Owner

hts_finish_html_file()'s header comment promises the write is skipped when the MD5 is unchanged. It is not: the function calls file_notify(), then filecreate(), then writes, every time.

The skip was real before #467, which lifted the code out of htsparse.c's HT_ADD_END macro and carried the comment across without the hashing branch. #512 then dropped the //[HTML-MD5]// cache entry it compared against, so there is nothing left to reinstate it from. Behaviour is unchanged; only the comment moves.

Closes #727

…does not

The MD5 comparison the comment promises left the tree in two steps: #467
extracted the function out of htsparse.c's HT_ADD_END macro without the skip
branch, and #512 removed the //[HTML-MD5]// cache entry it read. Drop the
parenthetical; the write is unconditional.

Signed-off-by: Xavier Roche <roche@httrack.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
@xroche
xroche merged commit a4db58f into master Jul 27, 2026
23 of 24 checks passed
@xroche
xroche deleted the fix/htscore-doc-727 branch July 27, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hts_finish_html_file is documented as skipping unchanged writes, and does not

1 participant