From f237a9aab58a342e723fcd5893fa91a13e4f284b Mon Sep 17 00:00:00 2001 From: lyswhut Date: Thu, 30 Apr 2020 00:17:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=80=E5=A7=8B=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=97=B6=E5=AF=B9=E4=BB=BB=E5=8A=A1=E5=BC=80=E5=A7=8B?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=97=B6=E7=9A=84=E9=94=99=E8=AF=AF=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/store/modules/download.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/renderer/store/modules/download.js b/src/renderer/store/modules/download.js index 4567e57c..4d7c5894 100644 --- a/src/renderer/store/modules/download.js +++ b/src/renderer/store/modules/download.js @@ -291,7 +291,10 @@ const actions = { try { await checkPath(rootState.setting.download.savePath) } catch (error) { - if (error) return commit('setStatusText', '检查下载目录出错: ' + error.message) + commit('onError', downloadInfo) + commit('setStatusText', '检查下载目录出错: ' + error.message) + await dispatch('startTask') + return } const _this = this const options = { @@ -422,7 +425,11 @@ const actions = { dl.updateSaveInfo(rootState.setting.download.savePath, downloadInfo.fileName) try { await dl.start() - } catch (_) {} + } catch (error) { + commit('onError', downloadInfo) + commit('setStatusText', error.message) + await dispatch('startTask') + } } else { await dispatch('handleStartTask', downloadInfo) }