Use Electron API to get 'Downloads' folder (#382)

Fixes #359 and #349.
This commit is contained in:
Feross Aboukhadijeh
2016-04-10 21:46:24 -07:00
parent 59cc912378
commit f6b9dbbbc4

View File

@@ -1,5 +1,6 @@
var os = require('os')
var path = require('path')
var electron = require('electron')
var app = electron.app
var config = require('../config')
var LocationHistory = require('./lib/location-history')
@@ -196,6 +197,6 @@ function getDefaultSavedState () {
]
}
],
downloadPath: path.join(os.homedir(), 'Downloads')
downloadPath: app.getPath('downloads')
}
}