Repository navigation
Keep every file in Download all when names collide - #400
Merged
abhishekgahlot2 merged 1 commit intoNov 2, 2026
Merged
abhishekgahlot2 merged 1 commit into
abhishekgahlot2 merged 1 commit into
Conversation
A generated name like "a (2).txt" could match a real file, and the ZIP kept only one of them. Names differing only by case also overwrote each other when unzipped on macOS or Windows. Reserve every real name first, then give a repeat the lowest free suffix, comparing names without regard to case or accent encoding.
Contributor
|
Merged, thanks @coolestnick. Nice catch on the case and accent collisions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #248
What changed
a (2).txtcould match a real file, and the ZIP kept only one.Report.pdfandreport.pdfno longer overwrite each other when unzipped on macOS or Windows. The ZIP keeps each file's spelling.Testing
Real
GET /api/artifacts/runs/:runId/archiveroute, 5 published files nameda.txt,a.txt,a (2).txt,Report.txt,report.txt:a.txt,a (2).txt,Report.txt,report.txta.txt,a (2).txt,a (3).txt,Report (2).txt,report.txtcd packages/artifact-formats && bun run test: 35 pass, 0 failbackend/test/artifacts.test.ts: 40 pass, 0 failbun run typecheckandbun test scripts/agent-docs.test.ts: passThis change has no visible UI, so the table is the before and after. The Download all button itself was not clicked in a browser.
Need help on this PR? Tag
@codesmith-botwith what you need.