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
|
// Locate data path to find transparency settings
|
||||||
let dataPath = "";
|
let dataPath = "";
|
||||||
if (process.platform === "win32" || process.platform === "darwin") dataPath = path.join(electron.app.getPath("userData"), "..");
|
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
|
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") + "/";
|
dataPath = path.join(dataPath, "BetterDiscord") + "/";
|
||||||
|
|
||||||
|
@ -126,4 +130,4 @@ if (BetterDiscord.getSetting("developer", "reactDevTools")) {
|
||||||
electron.app.whenReady().then(async ()=>{
|
electron.app.whenReady().then(async ()=>{
|
||||||
await ReactDevTools.install(dataPath);
|
await ReactDevTools.install(dataPath);
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in New Issue