From 1337a1c5b097022373ba34b4a5a0ca0e5ccf5412 Mon Sep 17 00:00:00 2001 From: nukeop <12746779+nukeop@users.noreply.github.com> Date: Wed, 7 Aug 2024 00:46:50 +0200 Subject: [PATCH] Add .exe to the end of the ffmpeg binary on windows --- packages/main/src/controllers/download.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/main/src/controllers/download.ts b/packages/main/src/controllers/download.ts index 4d1c2aabbc..377e1a6b92 100644 --- a/packages/main/src/controllers/download.ts +++ b/packages/main/src/controllers/download.ts @@ -28,7 +28,9 @@ class DownloadIpcCtrl { @inject(Window) private window: Window, @inject(Platform) private platform: Platform ) { - process.env.FFMPEG_BIN = path.join(path.dirname(app.getAppPath()), '../resources/bin/ffmpeg'); + const ffmpegFilename = platform.isWindows() ? 'ffmpeg.exe' : 'ffmpeg'; + + process.env.FFMPEG_BIN = path.join(path.dirname(app.getAppPath()), '../resources/bin/', ffmpegFilename); } removeInvalidCharacters(filename: string): string {