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.
		
		
		
		
		
			
		
			
				
	
	
		
			25 lines
		
	
	
		
			574 B
		
	
	
	
		
			JavaScript
		
	
			
		
		
	
	
			25 lines
		
	
	
		
			574 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;
 |