hdu_zhou bfa2794c76
fix(uploads): keep dedupe counter before compound archive suffix (#8042)
Re-uploading a file whose name collides with a compound archive suffix
(e.g. .tar.gz, .tar.bz2) previously inserted the dedupe counter inside
the suffix: a second report.tar.gz became report.tar_1.gz, which broke
file-type detection. Treat the compound suffix as a single extension so
the counter lands before it (report_1.tar.gz), matching single-suffix
behavior (report_1.tar, report_1.txt).

- Add _COMPOUND_SUFFIXES and split stem/suffix as one unit, sorted
  longest-first with a closed, non-overlapping allowlist (.tar.br added).
- Expand tests to all 13 suffixes plus counter-escalation and plain .tar.
- Add a CHANGELOG [Unreleased] Fixed entry.

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-11-10 09:52:01 +08:00
..