Override default userData according to app's name
This commit is contained in:
		
					parent
					
						
							
								06da5f254a
							
						
					
				
			
			
				commit
				
					
						d31df439c3
					
				
			
		
					 2 changed files with 4 additions and 0 deletions
				
			
		|  | @ -41,6 +41,7 @@ if (option.file && !option.webdriver) { | ||||||
|         app.setName(packageJson.productName); |         app.setName(packageJson.productName); | ||||||
|       else if (packageJson.name) |       else if (packageJson.name) | ||||||
|         app.setName(packageJson.name); |         app.setName(packageJson.name); | ||||||
|  |       app.setPath('userData', path.join(app.getPath('appData'), app.getName())); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // Run the app.
 |     // Run the app.
 | ||||||
|  |  | ||||||
|  | @ -90,6 +90,9 @@ process.once 'BIND_DONE', -> | ||||||
|   else |   else | ||||||
|     app.setDesktopName '#{app.getName()}.desktop' |     app.setDesktopName '#{app.getName()}.desktop' | ||||||
| 
 | 
 | ||||||
|  |   # Set the user data path according to application's name. | ||||||
|  |   app.setPath 'userData', path.join(app.getPath('appData'), app.getName()) | ||||||
|  | 
 | ||||||
|   # Load the chrome extension support. |   # Load the chrome extension support. | ||||||
|   require './chrome-extension.js' |   require './chrome-extension.js' | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Cheng Zhao
				Cheng Zhao