File tree 5 files changed +38
-17
lines changed
tauri-bundler/src/bundle/windows/msi
5 files changed +38
-17
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " tauri " : " patch:bug"
3
+ " tauri-build " : " patch:bug"
4
+ " tauri-bundler " : " patch:bug"
5
+ ---
6
+
7
+ Fix tauri fails to build if the project path contains glob characters
Original file line number Diff line number Diff line change @@ -199,7 +199,9 @@ permissions = [{default_permissions}]
199
199
}
200
200
201
201
tauri_utils:: acl:: build:: define_permissions (
202
- & plugin_out_dir. join ( "*" ) . to_string_lossy ( ) ,
202
+ & PathBuf :: from ( glob:: Pattern :: escape ( & plugin_out_dir. to_string_lossy ( ) ) )
203
+ . join ( "*" )
204
+ . to_string_lossy ( ) ,
203
205
name,
204
206
& plugin_out_dir,
205
207
|_| true ,
@@ -222,10 +224,12 @@ permissions = [{default_permissions}]
222
224
) ;
223
225
}
224
226
permission_files. extend ( tauri_utils:: acl:: build:: define_permissions (
225
- & default_permissions_path
226
- . join ( "**" )
227
- . join ( "*" )
228
- . to_string_lossy ( ) ,
227
+ & PathBuf :: from ( glob:: Pattern :: escape (
228
+ & default_permissions_path. to_string_lossy ( ) ,
229
+ ) )
230
+ . join ( "**" )
231
+ . join ( "*" )
232
+ . to_string_lossy ( ) ,
229
233
name,
230
234
& plugin_out_dir,
231
235
|_| true ,
Original file line number Diff line number Diff line change @@ -929,12 +929,11 @@ fn get_merge_modules(settings: &Settings) -> crate::Result<Vec<MergeModule>> {
929
929
let mut merge_modules = Vec :: new ( ) ;
930
930
let regex = Regex :: new ( r"[^\w\d\.]" ) ?;
931
931
for msm in glob:: glob (
932
- settings
933
- . project_out_directory ( )
934
- . join ( "*.msm" )
935
- . to_string_lossy ( )
936
- . to_string ( )
937
- . as_str ( ) ,
932
+ & PathBuf :: from ( glob:: Pattern :: escape (
933
+ & settings. project_out_directory ( ) . to_string_lossy ( ) ,
934
+ ) )
935
+ . join ( "*.msm" )
936
+ . to_string_lossy ( ) ,
938
937
) ? {
939
938
let path = msm?;
940
939
let filename = path
@@ -1042,7 +1041,11 @@ fn generate_resource_data(settings: &Settings) -> crate::Result<ResourceMap> {
1042
1041
let mut dlls = Vec :: new ( ) ;
1043
1042
1044
1043
let out_dir = settings. project_out_directory ( ) ;
1045
- for dll in glob:: glob ( out_dir. join ( "*.dll" ) . to_string_lossy ( ) . to_string ( ) . as_str ( ) ) ? {
1044
+ for dll in glob:: glob (
1045
+ & PathBuf :: from ( glob:: Pattern :: escape ( & out_dir. to_string_lossy ( ) ) )
1046
+ . join ( "*.dll" )
1047
+ . to_string_lossy ( ) ,
1048
+ ) ? {
1046
1049
let path = dll?;
1047
1050
let resource_path = dunce:: simplified ( & path) ;
1048
1051
let relative_path = path
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ libc = "0.2"
136
136
swift-rs = " 1"
137
137
138
138
[build-dependencies ]
139
+ glob = " 0.3"
139
140
heck = " 0.5"
140
141
tauri-build = { path = " ../tauri-build/" , default-features = false , version = " 2.0.4" }
141
142
tauri-utils = { path = " ../tauri-utils/" , version = " 2.1.1" , features = [
Original file line number Diff line number Diff line change @@ -376,10 +376,12 @@ permissions = [{default_permissions}]
376
376
. unwrap_or_else ( |_| panic ! ( "unable to autogenerate default permissions" ) ) ;
377
377
378
378
let permissions = tauri_utils:: acl:: build:: define_permissions (
379
- & permissions_out_dir
380
- . join ( "**" )
381
- . join ( "*.toml" )
382
- . to_string_lossy ( ) ,
379
+ & PathBuf :: from ( glob:: Pattern :: escape (
380
+ & permissions_out_dir. to_string_lossy ( ) ,
381
+ ) )
382
+ . join ( "**" )
383
+ . join ( "*.toml" )
384
+ . to_string_lossy ( ) ,
383
385
& format ! ( "tauri:{plugin}" ) ,
384
386
out_dir,
385
387
|_| true ,
@@ -432,7 +434,11 @@ permissions = [{}]
432
434
. unwrap_or_else ( |_| panic ! ( "unable to autogenerate core:default set" ) ) ;
433
435
434
436
let _ = tauri_utils:: acl:: build:: define_permissions (
435
- & permissions_out_dir. join ( "*.toml" ) . to_string_lossy ( ) ,
437
+ & PathBuf :: from ( glob:: Pattern :: escape (
438
+ & permissions_out_dir. to_string_lossy ( ) ,
439
+ ) )
440
+ . join ( "*.toml" )
441
+ . to_string_lossy ( ) ,
436
442
"tauri:core" ,
437
443
out_dir,
438
444
|_| true ,
You can’t perform that action at this time.
0 commit comments