Open full path instead of directory during upgrade

This was how it was before the Redux refactor
This commit is contained in:
Alex Liebowitz 2017-06-01 02:51:16 -04:00
parent fcfce1bf64
commit c7bab43b7b
3 changed files with 7 additions and 10 deletions

View file

@ -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)
}
})
});

View file

@ -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
})

View file

@ -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(