Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Extension Case Matching in Format Plugins #1833

Closed
danecoffey opened this issue Apr 19, 2022 · 1 comment
Closed

File Extension Case Matching in Format Plugins #1833

danecoffey opened this issue Apr 19, 2022 · 1 comment

Comments

@danecoffey
Copy link

Description of Issue

When registering a file format plugin you register specific extensions, typically this a lowercase variant, i.e. ".obj". The internal systems in USD used for matching against these extensions aren't case insensitive. As such when you load a file that has a different case, e.g. ".OBJ", it will fail to match the registered plugin that used the lower case variant. Ideally both the input file and the registered extensions would be checked against each other in a lower case version and successfully match. This would allow all variants of letter case to successfully match against the registered extension. This could happen in the SdfFileFormat::FindByExtension function. Additionally this fix might be applied to Hio and OpenImageIO texture readers as well. See the discussion on usd-interest related here: https://groups.google.com/g/usd-interest/c/GC9izpfsKIQ

Steps to Reproduce

  1. Register a file format as a lower case variant, i.e. "obj"
  2. Call Load on a URI that uses a different variant, i.e. *.OBJ
  3. The file will fail to load as no plugin has registered "OBJ"

System Information (OS, Hardware)

All

Package Versions

Build Flags

@jilliene
Copy link

Filed as internal issue #USD-7332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants