From 3ffac328fdbd4a87e065a63764e7742b5fa6865e Mon Sep 17 00:00:00 2001 From: gettinToasty Date: Fri, 13 Dec 2024 15:57:49 -0800 Subject: [PATCH] download highlighter into AppData folder (#5263) Co-authored-by: ggolda --- app/services/highlighter/ai-highlighter/updater.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/services/highlighter/ai-highlighter/updater.ts b/app/services/highlighter/ai-highlighter/updater.ts index 87cf94f8357b..e61630bf9737 100644 --- a/app/services/highlighter/ai-highlighter/updater.ts +++ b/app/services/highlighter/ai-highlighter/updater.ts @@ -8,6 +8,7 @@ import { importExtractZip } from 'util/slow-imports'; import { spawn } from 'child_process'; import { FFMPEG_EXE } from '../constants'; import Utils from '../../utils'; +import * as remote from '@electron/remote'; interface IAIHighlighterManifest { version: string; @@ -35,7 +36,7 @@ export class AiHighlighterUpdater { public currentUpdate: Promise | null = null; constructor() { - this.basepath = getSharedResource('ai-highlighter'); + this.basepath = path.join(remote.app.getPath('userData'), 'ai-highlighter'); this.manifestPath = path.resolve(this.basepath, 'manifest.json'); } @@ -52,7 +53,7 @@ export class AiHighlighterUpdater { } const highlighterBinaryPath = path.resolve( - getSharedResource('ai-highlighter'), + path.join(remote.app.getPath('userData'), 'ai-highlighter'), 'bin', 'app.exe', );