diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index 7ae405eee..95334a77a 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -30,7 +30,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Fixed an issue where data set nodes did not update if migrated or recalled outside of Zowe Explorer. [#3294](https://github.com/zowe/zowe-explorer-vscode/issues/3294) - Fixed an issue where listing data sets resulted in an error after opening a data set with an encoding. [#3347](https://github.com/zowe/zowe-explorer-vscode/issues/3347) - Fixed an issue where binary USS files were not fetched using the "Pull from Mainframe" context menu option. [#3355](https://github.com/zowe/zowe-explorer-vscode/issues/3355) -- Fixed an issue where cached encoding was applied for all profiles with the same dataset in the "Open with Encoding" menu. [#3363](https://github.com/zowe/zowe-explorer-vscode/pull/3363) +- Fixed an issue where cached encoding was applied for all profiles with the same dataset or USS path in the "Open with Encoding" menu. [#3363](https://github.com/zowe/zowe-explorer-vscode/pull/3363) ## `3.0.3` diff --git a/packages/zowe-explorer/src/trees/shared/SharedUtils.ts b/packages/zowe-explorer/src/trees/shared/SharedUtils.ts index 9895a58db..463e143d4 100644 --- a/packages/zowe-explorer/src/trees/shared/SharedUtils.ts +++ b/packages/zowe-explorer/src/trees/shared/SharedUtils.ts @@ -143,7 +143,7 @@ export class SharedUtils { public static async getCachedEncoding(node: IZoweTreeNode): Promise { let cachedEncoding: ZosEncoding; if (SharedUtils.isZoweUSSTreeNode(node)) { - cachedEncoding = await node.getEncodingInMap(node.fullPath); + cachedEncoding = await node.getEncodingInMap(node.resourceUri.path); } else { cachedEncoding = await (node as IZoweDatasetTreeNode).getEncodingInMap(node.resourceUri.path); } diff --git a/packages/zowe-explorer/src/trees/uss/ZoweUSSNode.ts b/packages/zowe-explorer/src/trees/uss/ZoweUSSNode.ts index a50d6c341..254479dae 100644 --- a/packages/zowe-explorer/src/trees/uss/ZoweUSSNode.ts +++ b/packages/zowe-explorer/src/trees/uss/ZoweUSSNode.ts @@ -299,9 +299,9 @@ export class ZoweUSSNode extends ZoweTreeNode implements IZoweUSSTreeNode { } UssFSProvider.instance.setEncodingForFile(this.resourceUri, encoding); if (encoding != null) { - this.updateEncodingInMap(this.fullPath, encoding); + this.updateEncodingInMap(this.resourceUri.path, encoding); } else { - delete UssFSProvider.instance.encodingMap[this.fullPath]; + delete UssFSProvider.instance.encodingMap[this.resourceUri.path]; } if (this.getParent() && this.getParent().contextValue === Constants.FAV_PROFILE_CONTEXT) { this.contextValue =