blob: eb3684a248870bcdc6bffe4bd628df308081ec43 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
--- a/main.js
+++ b/main.js
@@ -13,6 +13,15 @@
const fs = require("fs");
const path = require("path");
autoUpdater.autoDownload = false;
+
+// Set the config directory to XDG_CONFIG_HOME/ytdownloader
+const xdgConfigHome = process.env.XDG_CONFIG_HOME;
+let configDir = app.getPath('home') + "/.config/ytdownloader";
+if (xdgConfigHome) {
+ configDir = xdgConfigHome + "/ytdownloader";
+}
+app.setPath ('userData', configDir);
+
/**@type {BrowserWindow} */
let win = null;
let secondaryWindow = null;
|