FAILURE MAP
← Case archive

FA-76452 / Email MIME structure / Member archive

Resolve and de-duplicate attachment file names: case insensitive dedupe · case 02

Report.PDF and report.pdf are both saved under names that collide on case-insensitive file systems.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Each part has optional fstar (already decoded filename*), fname (filename) and ctname (Content-Type name) and a type. Precedence is fstar, fname, ctname. Directory components are removed (both "/" and "\" separate). An empty name, "." or ".." becomes "attachment" plus an extension by type (.pdf, .png, .txt, else .bin). Names are de-duplicated case-insensitively: the k-th copy gets " (k)" before the last extension, or at the end when there is no extension or the name starts with its only dot.

Why this case matters

Attachment names end up on disk; wrong names overwrite files, leak paths or confuse users.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
case-insensitive duplicates["Report2.PDF", "report2.pdf"]["Report2.PDF", "report2 (2).pdf"]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗