Skip to content

Commit 3626b7a

Browse files
nekenameFabianLars
andauthored
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>
1 parent eea12c1 commit 3626b7a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'tauri-bundler': 'patch:bug'
3+
---
4+
5+
Fix resources being bundled to the wrong path during RPM bundling when resources are specified as a map.

crates/tauri-bundler/src/bundle/linux/rpm.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
186186
FileOptions::new(resource_dir.to_string_lossy()).mode(FileMode::Dir { permissions: 0o755 }),
187187
)?;
188188
// Then add the resources files in that directory
189-
for src in settings.resource_files() {
190-
let src = src?;
191-
let dest = resource_dir.join(tauri_utils::resources::resource_relpath(&src));
192-
builder = builder.with_file(&src, FileOptions::new(dest.to_string_lossy()))?;
189+
for resource in settings.resource_files().iter() {
190+
let resource = resource?;
191+
let dest = resource_dir.join(resource.target());
192+
builder = builder.with_file(resource.path(), FileOptions::new(dest.to_string_lossy()))?;
193193
}
194194
}
195195

0 commit comments

Comments
 (0)