Skip to content

Commit

Permalink
Fix Import Local Files... command (#1396)
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-bsaviano authored Jul 5, 2024
1 parent ffa55d0 commit 43724cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/commands/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,7 @@ export async function importLocalFilesToServerSideFolder(wsFolderUri: vscode.Uri
return;
}
// Get the name and content of the files to import
const textDecoder = new TextDecoder();
const docs = await Promise.allSettled<{ name: string; content: string; uri: vscode.Uri }>(
uris.map((uri) =>
vscode.workspace.fs
Expand Down Expand Up @@ -768,11 +769,12 @@ export async function importLocalFilesToServerSideFolder(wsFolderUri: vscode.Uri
docs.map((e) => e.name)
);
// Import the files
const textDecoder = new TextDecoder();
return Promise.allSettled<string>(
docs.map(
throttleRequests((doc: { name: string; content: string; uri: vscode.Uri }) => {
return importFileFromContent(doc.name, doc.content, api).then(() => {
// Allow importing over deployed classes since the XML import
// command and SMP, terminal, and Studio imports allow it
return importFileFromContent(doc.name, doc.content, api, false, true).then(() => {
outputChannel.appendLine("Imported file: " + doc.uri.path.split("/").pop());
return doc.name;
});
Expand Down

0 comments on commit 43724cd

Please sign in to comment.