]> khamidou — GitHub mirrors - electron.git/commitdiff
Little formating on app.getDataPath.
authorCheng Zhao <zcbenz@gmail.com>
Sun, 17 Aug 2014 03:33:55 +0000 (11:33 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sun, 17 Aug 2014 03:33:55 +0000 (11:33 +0800)
atom/browser/api/atom_api_app.cc
docs/api/app.md

index fa0ef84b813faa227383829eadb45071a1c96fcc..ca8166136f15e817ccff058539b7f9f24454b5cd 100644 (file)
@@ -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(
index 2c1288a4266b87f4573f1d8dd6c1ff7596f2aafa..f2f19f5268da461307dc75388d7ff244c5ce3068 100644 (file)
@@ -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()