diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index 2fef2ad9d..28e25a8be 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -28,6 +28,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Fixed issue where users were not prompted to enter credentials if a 401 error was encountered when opening files, data sets or spools in the editor. [#3197](https://github.com/zowe/zowe-explorer-vscode/issues/3197) - Fixed issue where profile credential updates or token changes were not reflected within the filesystem. [#3289](https://github.com/zowe/zowe-explorer-vscode/issues/3289) - Fixed issue to update the success message when changing authentication from token to basic through the 'Change Authentication' option. +- Fixed an issue where fetching a USS file using `UssFSProvider.stat()` with a `fetch=true` query would cause Zowe Explorer to get stuck in an infinite loop. ## `3.0.2` diff --git a/packages/zowe-explorer/src/trees/uss/UssFSProvider.ts b/packages/zowe-explorer/src/trees/uss/UssFSProvider.ts index fdcf27024..e1a917d71 100644 --- a/packages/zowe-explorer/src/trees/uss/UssFSProvider.ts +++ b/packages/zowe-explorer/src/trees/uss/UssFSProvider.ts @@ -149,7 +149,7 @@ export class UssFSProvider extends BaseProvider implements vscode.FileSystemProv response = await ZoweExplorerApiRegister.getUssApi(profile).fileList(ussPath); // If request was successful, create directories for the path if it doesn't exist if (response.success && !keepRelative && response.apiResponse.items?.[0]?.mode?.startsWith("d") && !this.exists(uri)) { - await vscode.workspace.fs.createDirectory(uri); + await vscode.workspace.fs.createDirectory(uri.with({ query: "" })); } } catch (err) { if (err instanceof Error) { @@ -187,7 +187,7 @@ export class UssFSProvider extends BaseProvider implements vscode.FileSystemProv let parentDir = this._lookupParentDirectory(uri, true); if (parentDir == null) { const parentPath = path.posix.join(uri.path, ".."); - const parentUri = uri.with({ path: parentPath }); + const parentUri = uri.with({ path: parentPath, query: "" }); await vscode.workspace.fs.createDirectory(parentUri); parentDir = this._lookupParentDirectory(uri, false); parentDir.metadata = this._getInfoFromUri(parentUri);