Skip to content

Commit

Permalink
修复:ffmpeg转换路径包含空格问题
Browse files Browse the repository at this point in the history
  • Loading branch information
modstart committed Nov 23, 2024
1 parent 0f41127 commit 648bb70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions electron/mapi/ffmpeg/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ const getBinPath = () => {
}

const version = async () => {
const controller = await Apps.spawnShell(`${getBinPath()} -version`)
const controller = await Apps.spawnShell(`"${getBinPath()}" -version`)
const text = await controller.result()
const match = text.match(/ffmpeg version ([\d.]+)/)
return match ? match[1] : ''
}

const run = async (args: string[]) => {
const controller = await Apps.spawnShell(`${getBinPath()} ${args.join(' ')}`)
const controller = await Apps.spawnShell(`"${getBinPath()}" ${args.join(' ')}`)
return await controller.result()
}

Expand Down

0 comments on commit 648bb70

Please sign in to comment.