Merge 94cedd3e1a
into 78edeb77c6
This commit is contained in:
commit
4ef0b99636
|
@ -13,6 +13,10 @@ const buildInfoFile = path.resolve(appPath, "..", "build_info.json");
|
|||
// Locate data path to find transparency settings
|
||||
let dataPath = "";
|
||||
if (process.platform === "win32" || process.platform === "darwin") dataPath = path.join(electron.app.getPath("userData"), "..");
|
||||
if (process.argv.filter((arg) => arg.startsWith("--bd-data-dir")).length > 0)
|
||||
dataPath = process.argv.filter((arg) => arg.startsWith("--bd-data-dir"))[0].split("=")[1];
|
||||
else if (process.platform === "win32" || process.platform === "darwin")
|
||||
dataPath = path.join(electron.app.getPath("userData"), "..");
|
||||
else dataPath = process.env.XDG_CONFIG_HOME ? process.env.XDG_CONFIG_HOME : path.join(process.env.HOME, ".config"); // This will help with snap packages eventually
|
||||
dataPath = path.join(dataPath, "BetterDiscord") + "/";
|
||||
|
||||
|
|
Loading…
Reference in New Issue