commit
7d3ff96dd7
4 changed files with 10 additions and 13 deletions
|
@ -116,7 +116,7 @@ function openItem(fullPath) {
|
|||
} else if (process.platform == 'linux') {
|
||||
child = child_process.spawn('xdg-open', [fullPath], subprocOptions);
|
||||
} else if (process.platform == 'win32') {
|
||||
child = child_process.spawn(fullPath, [], subprocOptions);
|
||||
child = child_process.spawn(fullPath, Object.assign({}, subprocOptions, {shell: true}));
|
||||
}
|
||||
|
||||
// Causes child process reference to be garbage collected, allowing main process to exit
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
})
|
||||
});
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
|
|
@ -107,11 +107,11 @@ export const selectUpgradeFilename = createSelector(
|
|||
(platform, version) => {
|
||||
switch (platform) {
|
||||
case 'darwin':
|
||||
return `LBRY-${version}.dmg`;
|
||||
return `LBRY_${version}.dmg`;
|
||||
case 'linux':
|
||||
return `LBRY_${version}_amd64.deb`;
|
||||
case 'win32':
|
||||
return `LBRY.Setup.${version}.exe`;
|
||||
return `LBRY_${version}.exe`;
|
||||
default:
|
||||
throw 'Unknown platform';
|
||||
}
|
||||
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue