You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-desktop/app/user_config.js

26 lines
652 B
JavaScript

const path = require('path');
const app = require('electron').app || require('electron').remote.app;
const { start } = require('./base_config');
const config = require('./config');
// Use 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')}`);
const userDataPath = app.getPath('userData');
const targetPath = path.join(userDataPath, 'config.json');
const userConfig = start('user', targetPath);
module.exports = userConfig;