Skip to content

[Bug]: Upper-case file extensions (.REQIF, .REQIFZ, .ZIP) are rejected  #89

Open

Description

@samatstariongroup

What type of issue is this?

  • Bug report
  • Feature request

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of the reqifsharp
  • I have searched open and closed issues to ensure it has not already been reported

Description

SupportedFileExtensionKindExtensions.ConvertPathToSupportedFileExtensionKind compares the extension case-sensitively, so Deserialize("Export.REQIF") (and Serialize to such a path) throws ArgumentException: only .reqif, .reqifz and .zip are supported file extensions. Tools on Windows often write upper-case extensions.

The extension check was introduced in #47.

Proposal

  • Compare the extension case-insensitively (StringComparison.OrdinalIgnoreCase).

Acceptance criteria

  • .reqif, .REQIF, .ReqIF, .reqifz, .REQIFZ and .ZIP map to the expected SupportedFileExtensionKind; other extensions still throw.

Steps to Reproduce

new ReqIFDeserializer().Deserialize("Export.REQIF");
// System.ArgumentException: only .reqif, .reqifz and .zip are supported file extensions. (Parameter 'fileUri')

System Configuration

  • reqifsharp version: ReqIFSharp 10.1.2, ReqIFSharp.Extensions 5.2.2
  • Environment (Operating system, version and so on): Windows 11
  • .NET Framework version: .NET 10
  • Additional information: Found while planning editing and export in the ReqIF Viewer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions