Skip to content

Commit 562e8ca

Browse files
committed
fix(codegen): tray icon path is relative to the config directory
1 parent dc432ef commit 562e8ca

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changes/fix-tray-icon-lookup.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-codegen": patch
3+
---
4+
5+
Read the tray icon path relatively to the config directory.

core/tauri-codegen/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ pub fn context_codegen(data: ContextData) -> Result<TokenStream, EmbeddedAssetsE
242242
);
243243

244244
let system_tray_icon = if let Some(tray) = &config.tauri.system_tray {
245-
let system_tray_icon_path = tray.icon_path.clone();
245+
let system_tray_icon_path = config_parent.join(&tray.icon_path);
246246
let ext = system_tray_icon_path.extension();
247247
if ext.map_or(false, |e| e == "ico") {
248248
ico_icon(&root, &out_dir, system_tray_icon_path)?

0 commit comments

Comments
 (0)