From 78afa29ade59edcf60f85fe4a817690e09ea134e Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 17 Aug 2014 11:33:55 +0800 Subject: [PATCH] Little formating on app.getDataPath. --- atom/browser/api/atom_api_app.cc | 6 ++---- docs/api/app.md | 9 ++++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/atom/browser/api/atom_api_app.cc b/atom/browser/api/atom_api_app.cc index fa0ef84b813f..ca8166136f15 100644 --- a/atom/browser/api/atom_api_app.cc +++ b/atom/browser/api/atom_api_app.cc @@ -79,10 +79,8 @@ base::FilePath App::GetDataPath() { CHECK(PathService::Get(base::DIR_APP_DATA, &path)); #endif - base::FilePath data_path = path.Append( - base::FilePath::FromUTF8Unsafe(Browser::Get()->GetName())); - - return data_path; + return path.Append(base::FilePath::FromUTF8Unsafe( + Browser::Get()->GetName())); } mate::ObjectTemplateBuilder App::GetObjectTemplateBuilder( diff --git a/docs/api/app.md b/docs/api/app.md index 2c1288a4266b..f2f19f5268da 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -89,12 +89,11 @@ code will not run. ## 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`) - in Windows - * `~/.config/My App Name` in Linux - * `/Users/[username]/Library/Application Support/My App Name` in OS X + * `%APPDATA%\MyAppName` on Windows + * `~/.config/MyAppName` on Linux + * `~/Library/Application Support/MyAppName` on OS X ## app.getVersion()