Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

updates to packaging APIs and fixes - #38699

Merged
ericstj merged 4 commits into
masterfrom
dev/stevenbrix/packagingUpdates
Jun 20, 2019
Merged

ericstj merged 4 commits into
masterfrom
dev/stevenbrix/packagingUpdates

Conversation

@stevenbrix

Copy link
Copy Markdown
Contributor

Issue 36707

Adding back PackUriHelper.GetPartUri which was an API that exists in .NET Fx in the implementation contained in WindowsBase. There was no reason this wasn't added as part of #36493, it was just missed.

Fixes #36707

Issue 36794

The checks that exist in the Package.Open API that takes a string are more restrictive then they should be. These checks were brought over from the implementation in WindowsBase and we don't need to restrict on only having FileAccess.ReadWrite being passed in when FileMode.Create or FileMode.CreateNew are specified.

Fixes #36794

@stevenbrix stevenbrix added this to the 3.0 milestone Jun 19, 2019
@stevenbrix
stevenbrix requested a review from ericstj June 19, 2019 21:15
@@ -3250,7 +3248,8 @@ public void T111_String_Create_Write_Star()
{
var tempGuidName = GetTempFileInfoWithExtension(".docx");
// opening the package attempts to read the package, and no permissions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this comment correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i honestly didn't even really know what it means, mainly the "and no permissions" part

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yep, maybe just delete it then, since none of this looks correct.

Comment thread src/System.IO.Packaging/tests/Tests.cs Resolved
@stevenbrix
stevenbrix force-pushed the dev/stevenbrix/packagingUpdates branch from df0d035 to a55037e Compare June 19, 2019 22:00

@ericstj ericstj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@ericstj
ericstj merged commit 74032a6 into master Jun 20, 2019
@jkotas
jkotas deleted the dev/stevenbrix/packagingUpdates branch June 25, 2019 20:57
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* updates to packaging APIs and fixes

* removing checks entirely and fixing tests

* removing newline

* skipping tests on desktop


Commit migrated from dotnet/corefx@74032a6
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package.Open(string, ...) is more restrictive than Package.Open(stream, ...) S.IO.Packaging's PackUriHelper is missing GetPartUri method

2 participants