code cleanup

This commit is contained in:
Feross Aboukhadijeh
2016-06-02 22:32:01 -07:00
parent 5d410457ce
commit 5d71f9e9c6
2 changed files with 5 additions and 3 deletions

View File

@@ -92,6 +92,10 @@ function getDefaultDownloadPath () {
return ''
}
if (isPortable()) {
return path.join(getConfigPath(), 'Downloads')
}
var electron = require('electron')
return process.type === 'renderer'

View File

@@ -100,9 +100,7 @@ function setupSavedState (cb) {
var saved = {
prefs: {
downloadPath: config.IS_PORTABLE
? path.join(config.CONFIG_PATH, 'Downloads')
: config.DEFAULT_DOWNLOAD_PATH
downloadPath: config.DEFAULT_DOWNLOAD_PATH
},
torrents: config.DEFAULT_TORRENTS.map(createTorrentObject),
version: config.APP_VERSION /* make sure we can upgrade gracefully later */