File tree Expand file tree Collapse file tree 5 files changed +38
-17
lines changed
tauri-bundler/src/bundle/windows/msi Expand file tree Collapse file tree 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}]
199199 }
200200
201201 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 ( ) ,
203205 name,
204206 & plugin_out_dir,
205207 |_| true ,
@@ -222,10 +224,12 @@ permissions = [{default_permissions}]
222224 ) ;
223225 }
224226 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 ( ) ,
229233 name,
230234 & plugin_out_dir,
231235 |_| 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>> {
929929 let mut merge_modules = Vec :: new ( ) ;
930930 let regex = Regex :: new ( r"[^\w\d\.]" ) ?;
931931 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 ( ) ,
938937 ) ? {
939938 let path = msm?;
940939 let filename = path
@@ -1042,7 +1041,11 @@ fn generate_resource_data(settings: &Settings) -> crate::Result<ResourceMap> {
10421041 let mut dlls = Vec :: new ( ) ;
10431042
10441043 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+ ) ? {
10461049 let path = dll?;
10471050 let resource_path = dunce:: simplified ( & path) ;
10481051 let relative_path = path
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ libc = "0.2"
136136swift-rs = " 1"
137137
138138[build-dependencies ]
139+ glob = " 0.3"
139140heck = " 0.5"
140141tauri-build = { path = " ../tauri-build/" , default-features = false , version = " 2.0.4" }
141142tauri-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}]
376376 . unwrap_or_else ( |_| panic ! ( "unable to autogenerate default permissions" ) ) ;
377377
378378 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 ( ) ,
383385 & format ! ( "tauri:{plugin}" ) ,
384386 out_dir,
385387 |_| true ,
@@ -432,7 +434,11 @@ permissions = [{}]
432434 . unwrap_or_else ( |_| panic ! ( "unable to autogenerate core:default set" ) ) ;
433435
434436 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 ( ) ,
436442 "tauri:core" ,
437443 out_dir,
438444 |_| true ,
You can’t perform that action at this time.
0 commit comments