Skip to content

Commit 3e702cf

Browse files
authored
fix(bundler): ignore duplicated files in resource iter, closes #4126 (#4129)
1 parent e43ef69 commit 3e702cf

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

.changes/fix-glob-resource-wix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-bundler": patch
3+
---
4+
5+
Fixes processing of resources with glob patterns when there are nested directories on Windows.

tooling/bundler/src/bundle/windows/msi/wix.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,13 @@ fn generate_resource_data(settings: &Settings) -> crate::Result<ResourceMap> {
799799
.into_string()
800800
.expect("failed to read resource path");
801801

802+
// In some glob resource paths like `assets/**/*` a file might appear twice
803+
// because the `tauri_utils::resources::ResourcePaths` iterator also reads a directory
804+
// when it finds one. So we must check it before processing the file.
805+
if added_resources.contains(&resource_path) {
806+
continue;
807+
}
808+
802809
added_resources.push(resource_path.clone());
803810

804811
let resource_entry = ResourceFile {

0 commit comments

Comments
 (0)