mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
19 lines
506 B
Diff
19 lines
506 B
Diff
--- 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;
|