Skip to content

Commit 9c0e843

Browse files
authored
Export namespace warning check should be case-insensitive (#1541)
1 parent f449ef9 commit 9c0e843

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/commands/export.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,12 @@ export async function exportAll(): Promise<any> {
254254

255255
export async function exportExplorerItems(nodes: NodeBase[]): Promise<any> {
256256
const node = nodes[0];
257-
const origNamespace = config("conn", node.workspaceFolder).ns;
258-
if (origNamespace !== node.namespace) {
257+
const nodeNs = node.namespace.toUpperCase();
258+
const origNamespace = config("conn", node.workspaceFolder).ns?.toUpperCase();
259+
if (origNamespace?.toUpperCase() != node.namespace.toUpperCase()) {
259260
const answer = await vscode.window.showWarningMessage(
260261
`
261-
You are about to export from namespace ${node.namespace}.
262+
You are about to export from namespace ${nodeNs}.
262263
263264
Future edits to the file(s) in your local workspace will be saved and compiled in the primary namespace of your workspace root, ${origNamespace}, not the namespace from which you originally exported.
264265
@@ -272,9 +273,8 @@ Would you like to continue?`,
272273
return;
273274
}
274275
}
275-
const { workspaceFolder, namespace } = node;
276276
return Promise.all(nodes.map((node) => node.getItems4Export())).then((items) => {
277-
return exportList(items.flat(), workspaceFolder, namespace).then(() => explorerProvider.refresh());
277+
return exportList(items.flat(), node.workspaceFolder, nodeNs).then(() => explorerProvider.refresh());
278278
});
279279
}
280280

0 commit comments

Comments
 (0)