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

Packaging: Port fix for GetParts from .NETFramework #108681

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ericstj
Copy link
Member

@ericstj ericstj commented Oct 8, 2024

This ports a fix for the GetParts method to improve part URI handling and collision detection. Fix in .NETFramework originally made by @Kuldeep-MS

src/libraries/System.IO.Packaging/src/System/IO/Packaging/Package.cs: Added sorting of parts array to ensure proper order, introduced a dictionary and list to track parts and detect collisions, and implemented a new method CopyPartDictionaryToPartList to copy parts to _partList.

This ports a fix for the `GetParts` method to improve part URI handling and collision detection.

`src/libraries/System.IO.Packaging/src/System/IO/Packaging/Package.cs`: Added sorting of parts array to ensure proper order, introduced a dictionary and list to track parts and detect collisions, and implemented a new method `CopyPartDictionaryToPartList` to copy parts to `_partList`.
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@steveharter steveharter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; some minor questions on syntax and doc

Previously this comparison was Ordinal after calling ToUpperInvariant

This was changed to InvariantIgnoreCase which breaks because it will
treat things like ß and ss as equal where they were not before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants