From 5d71f9e9c66685f152356b18299b8bd9f4f8ce8e Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Thu, 2 Jun 2016 22:32:01 -0700 Subject: [PATCH] code cleanup --- config.js | 4 ++++ renderer/lib/state.js | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config.js b/config.js index 67713721..b1c75fa1 100644 --- a/config.js +++ b/config.js @@ -92,6 +92,10 @@ function getDefaultDownloadPath () { return '' } + if (isPortable()) { + return path.join(getConfigPath(), 'Downloads') + } + var electron = require('electron') return process.type === 'renderer' diff --git a/renderer/lib/state.js b/renderer/lib/state.js index 81fbacea..7d88ae40 100644 --- a/renderer/lib/state.js +++ b/renderer/lib/state.js @@ -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 */