fix(core): 修复micropython 板卡文件管理 下载文件时的异常未被捕获
This commit is contained in:
@@ -253,8 +253,9 @@ class StatusBarAmpy extends PageBase {
|
||||
isHtmlName: true,
|
||||
name: Menu.getItem(Msg.Lang['statusbar.ampy.download'], ''),
|
||||
callback: async (_, { $trigger }) => {
|
||||
const filePath = $trigger.attr('id');
|
||||
this.#fileTree_.showProgress();
|
||||
try {
|
||||
const filePath = $trigger.attr('id');
|
||||
const fp = await window.showSaveFilePicker({
|
||||
suggestedName: path.basename(filePath)
|
||||
});
|
||||
@@ -271,6 +272,7 @@ class StatusBarAmpy extends PageBase {
|
||||
await writer.write(result);
|
||||
await writer.close();
|
||||
}
|
||||
} catch (_) { }
|
||||
this.#fileTree_.hideProgress();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user