From 407222c4b5c48fd8b60b32be7a8157b8a4ca5c45 Mon Sep 17 00:00:00 2001 From: Brett Saviano Date: Thu, 5 Feb 2026 09:26:45 -0500 Subject: [PATCH] Fix mapping of client-side DFI file to its document name --- src/utils/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/index.ts b/src/utils/index.ts index 6a2eafb6..5d1c2409 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -170,9 +170,9 @@ export function getServerDocName(uri: vscode.Uri): string { return uri.path.slice(cspIdx); } else if (uri.path.toLowerCase().endsWith(".dfi")) { // Determine the file path relative to the workspace folder path - const wsPath = wsFolder.uri.path + wsFolder.uri.path.endsWith("/") ? "" : "/"; + const wsPath = `${wsFolder.uri.path}${!wsFolder.uri.path.endsWith("/") ? "/" : ""}`; const relativeFilePath = uri.path.startsWith(wsPath) ? uri.path.slice(wsPath.length) : ""; - if (relativeFilePath == "") return; + if (relativeFilePath == "") return; // uri isn't in the workspace folder. Should never happen. // Check for matching export settings first. If no match, use base name. const config = vscode.workspace.getConfiguration("objectscript.export", uri); const folder: string = config.get("folder");