Skip to content

Commit

Permalink
修正资源合并错误
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Apr 1, 2024
1 parent af23d2e commit cc73a1d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,17 @@ class Helper {

private registerCommandOfDownloadPresetUI() {
vscode.commands.registerCommand('y3-helper.downloadPresetUI', async () => {
return;
// await env.mapReady(true);
// if (!env.mapUri) {
// vscode.window.showErrorMessage("未找到地图路径!");
// return false;
// };
// await vscode.window.withProgress({
// location: vscode.ProgressLocation.Notification,
// title: '正在下载预设UI...',
// }, async (progress, token) => {
// await new preset.UI().download("https://up5.nosdn.127.net/editor/zip/edc461b312fc308779be9273a2cee6bb");
// });
});
}

Expand Down
7 changes: 6 additions & 1 deletion src/preset/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@ export class UI {
ignoreAttributes: false,
}).parse(xmlContent) ?? {};
} catch {
localXml = {};
localXml = {
"?xml": {
"@_version": "1.0",
"@_encoding": "utf-8",
},
};
}
let items = this.getXmlItem(localXml, 'Repository.Items.Item');
items = typeof items === 'object' ? items : [];
Expand Down

0 comments on commit cc73a1d

Please sign in to comment.