Little formating on app.getDataPath.
This commit is contained in:
		
					parent
					
						
							
								73bb05e530
							
						
					
				
			
			
				commit
				
					
						78afa29ade
					
				
			
		
					 2 changed files with 6 additions and 9 deletions
				
			
		| 
						 | 
					@ -79,10 +79,8 @@ base::FilePath App::GetDataPath() {
 | 
				
			||||||
  CHECK(PathService::Get(base::DIR_APP_DATA, &path));
 | 
					  CHECK(PathService::Get(base::DIR_APP_DATA, &path));
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  base::FilePath data_path = path.Append(
 | 
					  return path.Append(base::FilePath::FromUTF8Unsafe(
 | 
				
			||||||
      base::FilePath::FromUTF8Unsafe(Browser::Get()->GetName()));
 | 
					      Browser::Get()->GetName()));
 | 
				
			||||||
 | 
					 | 
				
			||||||
  return data_path;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
mate::ObjectTemplateBuilder App::GetObjectTemplateBuilder(
 | 
					mate::ObjectTemplateBuilder App::GetObjectTemplateBuilder(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -89,12 +89,11 @@ code will not run.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## app.getDataPath()
 | 
					## app.getDataPath()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Returns the right data path for the OS appended with the app name.
 | 
					Returns the path for storing configuration files, with app name appended.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 * `%APPDATA%\My App Name` (`C:\Users\[username]\AppData\Roaming\My App Name`)
 | 
					 * `%APPDATA%\MyAppName` on Windows
 | 
				
			||||||
   in Windows
 | 
					 * `~/.config/MyAppName` on Linux
 | 
				
			||||||
 * `~/.config/My App Name` in Linux
 | 
					 * `~/Library/Application Support/MyAppName` on OS X
 | 
				
			||||||
 * `/Users/[username]/Library/Application Support/My App Name` in OS X
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
## app.getVersion()
 | 
					## app.getVersion()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue