Skip to content

Commit

Permalink
Handle control characters in ds member names
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Johnson <[email protected]>
  • Loading branch information
t1m0thyj committed Jun 12, 2023
1 parent 636752c commit e984ccd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,23 @@ export class ZoweDatasetNode extends ZoweTreeNode implements IZoweDatasetTreeNod
elementChildren[temp.label.toString()] = temp;
} else {
// Creates a ZoweDatasetNode for a PDS member
const memberInvalid = item.member?.includes("\ufffd");
const temp = new ZoweDatasetNode(
item.member,
vscode.TreeItemCollapsibleState.None,
this,
null,
undefined,
memberInvalid ? globals.DS_FILE_ERROR_CONTEXT : undefined,
undefined,
this.getProfile()
);
temp.command = { command: "zowe.ds.ZoweNode.openPS", title: "", arguments: [temp] };
if (!memberInvalid) {
temp.command = { command: "zowe.ds.ZoweNode.openPS", title: "", arguments: [temp] };
} else {
temp.errorDetails = new zowe.imperative.ImperativeError({
msg: localize("getChildren.invalidMember", "Member cannot be opened because name contains special characters")
});
}
elementChildren[temp.label.toString()] = temp;
}
}
Expand Down

0 comments on commit e984ccd

Please sign in to comment.