From 5608546cc7d2b2f0f023fbc534924804469d6fd4 Mon Sep 17 00:00:00 2001 From: mp3butcher Date: Sat, 8 Feb 2025 00:24:40 +0100 Subject: [PATCH] fix win32 paths --- modules/Filepaths.js | 2 ++ modules/types/Query.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/Filepaths.js b/modules/Filepaths.js index 61c9133f..5d197afb 100644 --- a/modules/Filepaths.js +++ b/modules/Filepaths.js @@ -108,6 +108,8 @@ class Filepaths { this.setPermissions() break; } + this.baseappdir = this.app.isPackaged ? path.dirname(this.packedPrefix) : this.appPath; + await this.removeLeftOver(); } diff --git a/modules/types/Query.js b/modules/types/Query.js index 73ac64ff..b542f09b 100644 --- a/modules/types/Query.js +++ b/modules/types/Query.js @@ -129,7 +129,7 @@ class Query { outputs.forEach((e) => { let curargs2 = [...args2]; curargs2.push(path.join(video.downloadedPath, e), path.join(video.downloadedPath, 'dec' + e)); - this.process = execa.sync(path.join('resources', 'mp4decrypt' + (process.platform === "win32" ? '.exe' : '')), curargs2); + this.process = execa.sync(path.join(path.join(this.environment.paths.baseappdir, 'resources'), 'mp4decrypt' + (process.platform === "win32" ? '.exe' : '')), curargs2); }) let curargs = []; outputs.forEach((e) => {