From 7fc81ececad3a44fd1187e5e42f8a2f7f3a8956b Mon Sep 17 00:00:00 2001 From: Lasath Fernando Date: Mon, 18 May 2026 20:39:15 -0500 Subject: [PATCH] Fix chromium backend icon write failing with ENOENT The chromium build path created a TempDir via `tempdir()?.path().join(...)`, which dropped the TempDir at the end of the statement and deleted the directory before fetch_or_create_icon could write into it. Every `deskify build --backend chromium` failed with: Error: Failed to write RGBA PNG icon to /tmp/.tmpXXXXXX/icon.png Caused by: No such file or directory (os error 2) Bind the TempDir to a local like the tauri branch already does so it lives until the icon has been written and copied to its final location. --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 78a3150..becaf7e 100755 --- a/src/main.rs +++ b/src/main.rs @@ -56,7 +56,8 @@ fn execute_build(args: &BuildArgs, dry_run: bool, print_config: bool) -> Result< "Installing Chromium app '{}' for URL: {}", args.name, args.url ); - let temp_icon = tempdir()?.path().join("icon.png"); + let dir = tempdir().context("Failed to create temporary directory for building")?; + let temp_icon = dir.path().join("icon.png"); icon::fetch_or_create_icon(&args.url, args.icon.as_ref(), &temp_icon)?; install::install_chromium_app(args, &temp_icon)?; app::write_app_config_from_args(args)?; -- 2.47.3