Repository navigation
Conversation
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryEscapes desktop entry values and quotes RetroArch paths before writing the launcher.
Reviews (3) · Last reviewed commit: "Put two backslashes in the retro test's ..." · Reviewed by Greptile |
|
Reviewed at b9d6b07 and reproduced on a disposable Omarchy VM. Nothing wrong found and nothing pushed. The bug is real, and more common than the newline case suggests. I generated launchers for seven ROM names with Suite: Second opinion: Codex at medium effort and muse-spark-1.3 at high reviewed it. Both found the escaping correct: string escapes are applied after Exec quoting, as the Desktop Entry spec orders them, and nothing is escaped twice. Their agreement with my reading is not guaranteed to be independent. Codex added one point, which I checked against the source: Quickshell 0.3.2 does not unescape The helpers here are the same pair |
chessing234
left a comment
There was a problem hiding this comment.
desktop_exec_arg already escapes backslashes, then desktop_string_escape escapes them again. a core path a\b is written as a\\b, so the launcher opens a\b. escape the desktop string first, or do not run the backslash pass over Exec.
|
Thanks for flagging this. I reproduced the exact literal-backslash case through the generated desktop file and real gio launch path. The two escaping passes correspond to two parsing layers: Desktop Entry string unescaping, then quoted Exec argument parsing. The launched NUL-delimited argv contains the original single backslash byte-for-byte. Commit 49a4baf adds that case permanently to the existing end-to-end test; it passes while comparing the captured core and game paths exactly. No production escaping change is needed. Please re-check the new regression when convenient. |
A backslash before an ordinary letter survives a quoted Exec argument whether or not it was escaped, so the test passed with desktop_exec_arg's backslash pass removed. Two consecutive backslashes fail in both directions, too little escaping or too much. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: muse-spark-1.3-contributor High <noreply@meta.com>
|
Re-reviewed at 49a4baf on a disposable Omarchy VM, and pushed one small fix to the new test. The script is right, and the double-escape review does not hold. @chessing234's review says a core path What I pushed (d260c76): the backslash added in 49a4baf sits before a Suite: Second opinion: Codex at medium effort and muse-spark-1.3 at high reviewed both rounds. Both found the gap in the test before I did, and both agree the script's escaping order is correct; that agreement is not guaranteed to be independent. On the fixed test, both found nothing open. This now waits on the maintainer. |
|
Codex at high effort re-reviewed d260c76 with Opus 5.5 at high effort and muse-wonder via pi at high thinking. Both reviewers agree that #19965 already brought this production fix to On a disposable Omarchy VM, a Opus identified one adjustment needed if that test is kept against current The old failed translation run no longer has retrievable logs or jobs, so its cause remains unknown. On the VM, the structural test stops at the same locale-generation permission error on this head and its original merge base; extraction passes on both. This does not establish what failed on GitHub, and no full suite pass is claimed. Nothing pushed. This waits on the maintainer's decision about retaining the additional test now that the production fix has landed. |
Summary
Why
A ROM filename can contain a newline and create additional keys in the generated desktop file. Quotes, percent field codes, and backslashes also have defined parsing behavior in Desktop Entry Exec values. Applying the string and Exec escaping layers in specification order prevents invalid entries while preserving unusual filenames.
Test
bash test/shell.d/games-retro-install-test.shThe regression verifies that only one Exec key is written, launches the entry through real
gio launch, captures NUL-delimited RetroArch arguments, and confirms that both original paths arrive as distinct, byte-for-byte unchanged arguments.