From c0349680aa822ce854572766227fe96556fc1ba6 Mon Sep 17 00:00:00 2001 From: ggolda Date: Fri, 13 Dec 2024 16:43:25 -0700 Subject: [PATCH] download highlighter into AppData folder --- 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', );