diff --git a/ui/js/actions/app.js b/ui/js/actions/app.js index 9b928c512..a513b820c 100644 --- a/ui/js/actions/app.js +++ b/ui/js/actions/app.js @@ -2,7 +2,7 @@ import * as types from 'constants/action_types' import lbry from 'lbry' import { selectUpdateUrl, - selectUpgradeDownloadDir, + selectUpgradeDownloadPath, selectUpgradeDownloadItem, selectUpgradeFilename, selectPageTitle, @@ -110,7 +110,7 @@ export function doSkipUpgrade() { export function doStartUpgrade() { return function(dispatch, getState) { const state = getState() - const upgradeDownloadPath = selectUpgradeDownloadDir(state) + const upgradeDownloadPath = selectUpgradeDownloadPath(state) ipcRenderer.send('upgrade', upgradeDownloadPath) } @@ -135,14 +135,11 @@ export function doDownloadUpgrade() { * too soon. */ - const _upgradeDownloadItem = downloadItem; - const _upgradeDownloadPath = path.join(dir, upgradeFilename); - dispatch({ type: types.UPGRADE_DOWNLOAD_COMPLETED, data: { - dir, - downloadItem + downloadItem, + path: path.join(dir, upgradeFilename) } }) }); diff --git a/ui/js/reducers/app.js b/ui/js/reducers/app.js index af99b8a88..162a81fba 100644 --- a/ui/js/reducers/app.js +++ b/ui/js/reducers/app.js @@ -34,7 +34,7 @@ reducers[types.UPGRADE_CANCELLED] = function(state, action) { reducers[types.UPGRADE_DOWNLOAD_COMPLETED] = function(state, action) { return Object.assign({}, state, { - downloadDir: action.data.dir, + downloadPath: action.data.path, upgradeDownloading: false, upgradeDownloadCompleted: true }) diff --git a/ui/js/selectors/app.js b/ui/js/selectors/app.js index ebf2a1398..262d704ae 100644 --- a/ui/js/selectors/app.js +++ b/ui/js/selectors/app.js @@ -170,9 +170,9 @@ export const selectUpgradeSkipped = createSelector( (state) => state.upgradeSkipped ) -export const selectUpgradeDownloadDir = createSelector( +export const selectUpgradeDownloadPath = createSelector( _selectState, - (state) => state.downloadDir + (state) => state.downloadPath ) export const selectUpgradeDownloadItem = createSelector(