diff --git a/.changes/fix-glob-resource-wix.md b/.changes/fix-glob-resource-wix.md new file mode 100644 index 000000000..9e534fcc7 --- /dev/null +++ b/.changes/fix-glob-resource-wix.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": patch +--- + +Fixes processing of resources with glob patterns when there are nested directories on Windows. diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index 5ed46a073..4e17feff7 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -799,6 +799,13 @@ fn generate_resource_data(settings: &Settings) -> crate::Result { .into_string() .expect("failed to read resource path"); + // In some glob resource paths like `assets/**/*` a file might appear twice + // because the `tauri_utils::resources::ResourcePaths` iterator also reads a directory + // when it finds one. So we must check it before processing the file. + if added_resources.contains(&resource_path) { + continue; + } + added_resources.push(resource_path.clone()); let resource_entry = ResourceFile {