Vesktop/patches/arrpc@3.5.0.patch
2024-12-22 17:13:16 -05:00

20 lines
No EOL
816 B
Diff

diff --git a/src/process/index.js b/src/process/index.js
index 04b3898..205f96b 100644
--- a/src/process/index.js
+++ b/src/process/index.js
@@ -2,12 +2,11 @@ const rgb = (r, g, b, msg) => `\x1b[38;2;${r};${g};${b}m${msg}\x1b[0m`;
const log = (...args) => console.log(`[${rgb(88, 101, 242, 'arRPC')} > ${rgb(237, 66, 69, 'process')}]`, ...args);
import fs from 'node:fs';
-import { dirname, join } from 'path';
-import { fileURLToPath } from 'url';
+import { join } from 'path';
import { get } from 'https';
-const __dirname = dirname(fileURLToPath(import.meta.url));
-const databasePath = join(__dirname, 'detectable.json');
+import { app } from 'electron';
+const databasePath = join(app.getPath('userData'), 'detectable.json');
async function getDatabase() {
return new Promise((resolve, reject) => {