code cleanup
This commit is contained in:
@@ -92,6 +92,10 @@ function getDefaultDownloadPath () {
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isPortable()) {
|
||||||
|
return path.join(getConfigPath(), 'Downloads')
|
||||||
|
}
|
||||||
|
|
||||||
var electron = require('electron')
|
var electron = require('electron')
|
||||||
|
|
||||||
return process.type === 'renderer'
|
return process.type === 'renderer'
|
||||||
|
|||||||
@@ -100,9 +100,7 @@ function setupSavedState (cb) {
|
|||||||
|
|
||||||
var saved = {
|
var saved = {
|
||||||
prefs: {
|
prefs: {
|
||||||
downloadPath: config.IS_PORTABLE
|
downloadPath: config.DEFAULT_DOWNLOAD_PATH
|
||||||
? path.join(config.CONFIG_PATH, 'Downloads')
|
|
||||||
: config.DEFAULT_DOWNLOAD_PATH
|
|
||||||
},
|
},
|
||||||
torrents: config.DEFAULT_TORRENTS.map(createTorrentObject),
|
torrents: config.DEFAULT_TORRENTS.map(createTorrentObject),
|
||||||
version: config.APP_VERSION /* make sure we can upgrade gracefully later */
|
version: config.APP_VERSION /* make sure we can upgrade gracefully later */
|
||||||
|
|||||||
Reference in New Issue
Block a user