File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " opener " : patch
3
+ " opener-js " : patch
4
+ ---
5
+
6
+ Fix broken JS commands ` opener.openPath ` and ` opener.openUrl ` on mobile.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use tauri::{
9
9
AppHandle , Runtime ,
10
10
} ;
11
11
12
- use crate :: { scope:: Scope , Error } ;
12
+ use crate :: { scope:: Scope , Error , OpenerExt } ;
13
13
14
14
#[ tauri:: command]
15
15
pub async fn open_url < R : Runtime > (
@@ -34,7 +34,7 @@ pub async fn open_url<R: Runtime>(
34
34
) ;
35
35
36
36
if scope. is_url_allowed ( & url, with. as_deref ( ) ) {
37
- crate :: open_url ( url, with)
37
+ app . opener ( ) . open_url ( url, with)
38
38
} else {
39
39
Err ( Error :: ForbiddenUrl { url, with } )
40
40
}
@@ -63,7 +63,7 @@ pub async fn open_path<R: Runtime>(
63
63
) ;
64
64
65
65
if scope. is_path_allowed ( Path :: new ( & path) , with. as_deref ( ) ) ? {
66
- crate :: open_path ( path, with)
66
+ app . opener ( ) . open_path ( path, with)
67
67
} else {
68
68
Err ( Error :: ForbiddenPath { path, with } )
69
69
}
You can’t perform that action at this time.
0 commit comments