fix(bundler): bundle resources to correct path during RPM bundling when resources are specified as a map (#12759)

Co-authored-by: Fabian-Lars <github@fabianlars.de>
This commit is contained in:
ninjadev64
2025-03-09 15:19:18 +00:00
committed by GitHub
parent eea12c196e
commit 3626b7a92b
2 changed files with 9 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
---
'tauri-bundler': 'patch:bug'
---
Fix resources being bundled to the wrong path during RPM bundling when resources are specified as a map.

View File

@@ -186,10 +186,10 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
FileOptions::new(resource_dir.to_string_lossy()).mode(FileMode::Dir { permissions: 0o755 }),
)?;
// Then add the resources files in that directory
for src in settings.resource_files() {
let src = src?;
let dest = resource_dir.join(tauri_utils::resources::resource_relpath(&src));
builder = builder.with_file(&src, FileOptions::new(dest.to_string_lossy()))?;
for resource in settings.resource_files().iter() {
let resource = resource?;
let dest = resource_dir.join(resource.target());
builder = builder.with_file(resource.path(), FileOptions::new(dest.to_string_lossy()))?;
}
}