From 43724cd0c27eb8456abf1a773d0f0f7b5be37361 Mon Sep 17 00:00:00 2001 From: Brett Saviano Date: Fri, 5 Jul 2024 17:47:06 -0400 Subject: [PATCH] Fix `Import Local Files...` command (#1396) --- src/commands/compile.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/commands/compile.ts b/src/commands/compile.ts index fd17b595..6ede2aee 100644 --- a/src/commands/compile.ts +++ b/src/commands/compile.ts @@ -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 @@ -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( 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; });