]> khamidou — GitHub mirrors - electron.git/commitdiff
Add app.getHomeDir() API.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 19 Jun 2013 05:49:58 +0000 (13:49 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 19 Jun 2013 05:49:58 +0000 (13:49 +0800)
browser/api/lib/app.coffee

index 3feb0d2bc2b7a1b02eeefa17df88e56164a8f644..7f44dd8c5ac1e042c55adc2fcd770de1efb9009d 100644 (file)
@@ -6,6 +6,9 @@ Application::__proto__ = EventEmitter.prototype
 
 app = new Application
 
+app.getHomeDir = ->
+  process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
+
 app.commandLine =
   appendSwitch: bindings.appendSwitch,
   appendArgument: bindings.appendArgument