Fix bug where cancelling path choice dialog would end up not being able to open any more dialog + random dialog appearance

This commit is contained in:
Kylart 2017-09-14 21:33:26 +02:00
parent 769d89838e
commit ba518703f3
2 changed files with 13 additions and 7 deletions

View File

@ -57,6 +57,8 @@ exports.openExternal = (query, res) => {
}
sendRes(res, result)
} else {
sendEmptyRes(res)
}
})
break

View File

@ -327,17 +327,21 @@ export default {
async changePath ({commit, dispatch}) {
const {data} = await axios.get('openThis?type=dialog')
commit('emptyLocals')
commit('setCurrentDir', data.path)
dispatch('refreshLocal')
if (data) {
commit('emptyLocals')
commit('setCurrentDir', data.path)
dispatch('refreshLocal')
}
},
async changePathWithConfig ({commit, dispatch}) {
const {data} = await axios.get('openThis?type=dialog')
commit('emptyLocals')
commit('setCurrentDir', data.path)
commit('setConfigDir', data.path)
dispatch('refreshLocal')
if (data) {
commit('emptyLocals')
commit('setCurrentDir', data.path)
commit('setConfigDir', data.path)
dispatch('refreshLocal')
}
},
async openNewsLink ({state}, link) {
log(`Opening ${link}`)