signal-desktop/app/user_config.js
Scott Nonnenberg 754d65ae2e Let's make it all pretty, shall we?
We missed a couple directories with previous attempts to turn this on
globally: app/ and libtextsecure/

Not to mention files in places we didn't expect: ts files that weren't
in the ts directory!

This turns prettier on for every file we care about (js, ts, tsx, md)
everywhere in the project but for a few key parts.
2018-05-02 13:40:57 -07:00

23 lines
573 B
JavaScript

const path = require('path');
const { app } = require('electron');
const ElectronConfig = require('electron-config');
const config = require('./config');
// use a separate data directory for development
if (config.has('storageProfile')) {
const userData = path.join(
app.getPath('appData'),
`Signal-${config.get('storageProfile')}`
);
app.setPath('userData', userData);
}
console.log(`userData: ${app.getPath('userData')}`);
// this needs to be below our update to the appData path
const userConfig = new ElectronConfig();
module.exports = userConfig;