Skip to content

Commit

Permalink
ensure user path exists
Browse files Browse the repository at this point in the history
  • Loading branch information
blarfoon committed Jan 19, 2023
1 parent ce3b4b1 commit 36f9548
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion public/electron.js
Expand Up @@ -168,7 +168,13 @@ const userAgent = new UserAgent({
// app.allowRendererProcessReuse = true;
Menu.setApplicationMenu(Menu.buildFromTemplate(edit));

app.setPath('userData', path.join(app.getPath('appData'), 'gdlauncher_next'));
let baseUserPath = path.join(app.getPath('appData'), 'gdlauncher_next');

if (!fss.existsSync(baseUserPath)) {
fss.mkdirSync(baseUserPath);
}

app.setPath('userData', baseUserPath);

let allowUnstableReleases = false;
const releaseChannelExists = fss.existsSync(
Expand Down

0 comments on commit 36f9548

Please sign in to comment.