mirror of
https://github.com/rommapp/romm.git
synced 2026-12-04 21:02:21 +01:00
`getDownloadPath` encoded a selected file name but left `fs_name` raw, then `getDownloadLink` ran `encodeURI` over the whole result. Three things went wrong: - a selected file name came back double-encoded, so the browser saved `Game%20(USA).zip` instead of `Game (USA).zip` - `encodeURI` also hit the query string, so `file_ids=29%2C30` reached the backend as one value and `int()` raised on it: copying a link for a multi-file selection produced a 500 - a raw `#` in `fs_name` started the fragment, truncating the path before the request left the browser Encode the segment once in `getDownloadPath` for both branches and let `getDownloadLink` only prepend the origin. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>