Fix chromium backend icon write failing with ENOENT #1
Reference in New Issue
Block a user
Delete Branch "fix/chromium-icon-tempdir-drop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
deskify build --backend chromiumcurrently fails for every invocation with:The chromium branch in
execute_buildcreates its temp directory withtempdir()?.path().join("icon.png"). TheTempDirreturned bytempdir()is unbound and so dropped at the end of that statement, and its
Dropimplremoves the directory — before
fetch_or_create_iconever tries to writeinto it.
Bind the
TempDirto a local (let dir = tempdir()?;) so it lives untilthe icon has been written and copied to its final install location. This
mirrors what the tauri branch a few lines above already does correctly.
Type of Change
What Was Tested
cargo fmt --checkcargo clippy --all-targets --all-features -- -D warningscargo test(37 passed)cargo checkdeskify build --url https://example.com --name "Example" --backend chromium— fails on master with the ENOENT above, succeeds on this branch and installs a working.desktopentry.Behavior / Risk Notes
execute_build.matcharm ofexecute_build, and exercising it in a unit test would require refactoring that arm out. Felt out of proportion for a 2-line fix where symmetry with the adjacent tauri branch is the safeguard. Happy to add one if you'd prefer.Screenshots (if relevant)
N/A — no UI changes.