Skip to content

getExtension does not work as expected #4258

@JWaters02

Description

@JWaters02

Describe the bug

When testing #4255 I was the downloaded files are only being txt despite my PDS names matching the DS_EXTENSION_MAP, and with "override extension" being disabled.

I tested this both before the change and after the change and it seems to be a bug in both, i.e. in the getExtension function, so not to do with that change.

For example, MY.USERID.TESTJCL contains JCL members, but they are all downloading to .txt, despite the fact that "JCL" is in "TESTJCL".

When I disable the JCL support extension, the members in that TESTJCL PDS indeed do not open up as JCL. But obviously I've had it enabled the whole time, so I only noticed this issue once I had done the download on the PDS.

Note that I do have **/*.TESTJCL*{,/*} in my files.associations setting but since getExtension doesn't take files.associations setting into account, it doesn't have any affect for opening or downloading the files from Zowe Explorer (only for local files).

To Reproduce

  1. Make PDS containing TESTJCL name
  2. Make members in the PDS
  3. Click "download all members" or "download member" and make sure "override file extension" is false
  4. See that the members are downloaded as .txt instead of .jcl

Expected behavior

Since the PDS name contains "JCL" in it, the members should be downloaded as .jcl

Screenshots

Desktop (please complete the following information):

  • OS:
  • Zowe Explorer Version:
  • (Optional) Zowe CLI Version:
  • (Optional) Do you have secure credentials enabled?
  • (Optional) Are you using a custom credential manager?

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    V4bugSomething isn't workingpriority-mediumNot functioning - next quarter if capacity permitsseverity-mediumBug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Medium Priority

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions