zowe / zowe-explorer-vscode

Visual Studio Code Extension for Zowe, which lets users interact with z/OS Data Sets, Unix System Services, and Jobs on a remote mainframe instance. Powered by Zowe SDKs.
Eclipse Public License 2.0
159 stars 89 forks source link

Opening file in USS view throws error when the active filter is the file's path #2902

Open benjamin-t-santos opened 1 month ago

benjamin-t-santos commented 1 month ago

Describe the bug If you set the active filter in the Zowe Explorer USS view to a file path, and then try to open that file, an error is displayed and the file is not opened.

To Reproduce

  1. Open the Zowe Explorer USS view
  2. Set the filter to a specific file path (e.g. "/u/user/testdirectory/testfile.txt")
  3. Double-click the file to open it
  4. Error message is displayed:
    z/OSMF REST API Error: Rest API failure with HTTP(S) status 500 category: 1 rc: 8 reason: 9 message: Error executing command. exit_code=1 details: - /bin/chtag -p /u/user/testdirectory/testfile.txt/u/user/testdirectory/testfile.txt - chtag: FSUM6180 file \"/u/user/testdirectory/testfile.txt/u/user/testdirectory/testfile.txt\": EDC5135I Not a directory. (errno2=0x0594003C)

Expected behavior The file should be opened in the editor, or file paths to files should not be accepted as filters.

Screenshots

https://github.com/zowe/zowe-explorer-vscode/assets/115251181/07c750e3-c297-433e-b012-3462351b5a6a

Desktop (please complete the following information):

Additional context

I believe it is an issue with the Zowe Explorer USS tree node's fullPath property. It seems like the node is using the active filter as the parent directory, which is in this case is a file and not directory.

github-actions[bot] commented 1 month ago

Thank you for creating a bug report. We will investigate the bug and evaluate its impact on the product. If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.