mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 21:53:18 +00:00
Split configuration into low and high traffic files
Also, we're now handling config ourselves instead of using electron-config and config dependencies.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
const path = require('path');
|
||||
|
||||
const { app } = require('electron');
|
||||
const ElectronConfig = require('electron-config');
|
||||
|
||||
const { start } = require('./base_config');
|
||||
const config = require('./config');
|
||||
|
||||
// use a separate data directory for development
|
||||
// Use separate data directory for development
|
||||
if (config.has('storageProfile')) {
|
||||
const userData = path.join(
|
||||
app.getPath('appData'),
|
||||
@@ -17,7 +17,9 @@ if (config.has('storageProfile')) {
|
||||
|
||||
console.log(`userData: ${app.getPath('userData')}`);
|
||||
|
||||
// this needs to be below our update to the appData path
|
||||
const userConfig = new ElectronConfig();
|
||||
const userDataPath = app.getPath('userData');
|
||||
const targetPath = path.join(userDataPath, 'config.json');
|
||||
|
||||
const userConfig = start('user', targetPath);
|
||||
|
||||
module.exports = userConfig;
|
||||
|
||||
Reference in New Issue
Block a user