2024-06-16 18:42:48 +02:00
|
|
|
diff --git a/src/process/index.js b/src/process/index.js
|
2024-12-20 16:40:18 -05:00
|
|
|
index 04b3898..205f96b 100644
|
2024-06-16 18:42:48 +02:00
|
|
|
--- a/src/process/index.js
|
|
|
|
+++ b/src/process/index.js
|
2024-12-20 16:40:18 -05:00
|
|
|
@@ -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';
|
2024-06-16 18:42:48 +02:00
|
|
|
|
|
|
|
-const __dirname = dirname(fileURLToPath(import.meta.url));
|
2024-12-20 16:40:18 -05:00
|
|
|
-const databasePath = join(__dirname, 'detectable.json');
|
|
|
|
+import { app } from 'electron';
|
|
|
|
+const databasePath = join(app.getPath('userData'), 'detectable.json');
|
2024-06-16 18:42:48 +02:00
|
|
|
|
2024-12-20 16:40:18 -05:00
|
|
|
async function getDatabase() {
|
|
|
|
return new Promise((resolve, reject) => {
|