@@ -17,7 +17,6 @@ import { getCurrent, onOpenUrl } from "@tauri-apps/plugin-deep-link"
1717import { open , save } from "@tauri-apps/plugin-dialog"
1818import { fetch as tauriFetch } from "@tauri-apps/plugin-http"
1919import { isPermissionGranted , requestPermission } from "@tauri-apps/plugin-notification"
20- import { openPath as openerOpenPath } from "@tauri-apps/plugin-opener"
2120import { type as ostype } from "@tauri-apps/plugin-os"
2221import { relaunch } from "@tauri-apps/plugin-process"
2322import { open as shellOpen } from "@tauri-apps/plugin-shell"
@@ -116,29 +115,7 @@ const createPlatform = (): Platform => {
116115 void shellOpen ( url ) . catch ( ( ) => undefined )
117116 } ,
118117 async openPath ( path : string , app ?: string ) {
119- const os = ostype ( )
120- if ( os === "windows" ) {
121- const resolvedPath = await ( async ( ) => {
122- if ( window . __OPENCODE__ ?. wsl ) {
123- const converted = await commands . wslPath ( path , "windows" ) . catch ( ( ) => null )
124- if ( converted ) return converted
125- }
126-
127- return path
128- } ) ( )
129- const resolvedApp = ( app && ( await commands . resolveAppPath ( app ) ) ) || app
130- const isPowershell = ( value ?: string ) => {
131- if ( ! value ) return false
132- const name = value . toLowerCase ( ) . replaceAll ( "/" , "\\" ) . split ( "\\" ) . pop ( )
133- return name === "powershell" || name === "powershell.exe"
134- }
135- if ( isPowershell ( resolvedApp ) ) {
136- await commands . openInPowershell ( resolvedPath )
137- return
138- }
139- return openerOpenPath ( resolvedPath , resolvedApp )
140- }
141- return openerOpenPath ( path , app )
118+ await commands . openPath ( path , app ?? null )
142119 } ,
143120
144121 back ( ) {
0 commit comments