Skip to content

Fix duplicated path.Contains check and other checks in Path.GetFullPath - #55373

Merged
jeffhandley merged 9 commits into
dotnet:mainfrom
steveberdy:main
Jul 24, 2021
Merged

Fix duplicated path.Contains check and other checks in Path.GetFullPath#55373
jeffhandley merged 9 commits into
dotnet:mainfrom
steveberdy:main

Conversation

@steveberdy

@steveberdysteveberdy commented Jul 8, 2021

Copy link
Copy Markdown
Contributor

Summary

Refactors code to prevent duplicate checks on paths in the Path.GetFullPath methods.

Fixes#54993

@ghostghost added the area-System.IO label Jul 8, 2021
@ghost

ghost commented Jul 8, 2021

Copy link
Copy Markdown

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

Issue Details
Author:steveberdy
Assignees:-
Labels:

area-System.IO

Milestone:-

@steveberdysteveberdy changed the title Duplicated path.Contains('\0') checkFix duplicated path.Contains('\0') check in Path.GetFullPathJul 8, 2021
@steveberdysteveberdy changed the title Fix duplicated path.Contains('\0') check in Path.GetFullPathFix duplicated path.Contains check and other checks in Path.GetFullPathJul 9, 2021
Switched method from a private protection level to an internal protection level. Also removed trailing whitespace.
@runfoapprunfoappBot mentioned this pull request Jul 10, 2021
@steveberdy

Copy link
Copy Markdown
ContributorAuthor

@stephentoub Please review

@terrajobstterrajobst added the community-contribution Indicates that the PR has been added by a community member label Jul 19, 2021

@jeffhandleyjeffhandley 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.

Nit suggestion on renaming the method. I'll go ahead and commit the suggestions and merge once checks rerun/pass.

Comment threadsrc/libraries/System.Private.CoreLib/src/System/IO/Path.Windows.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/IO/Path.Windows.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/IO/Path.Windows.cs Outdated
Comment threadsrc/libraries/System.Private.CoreLib/src/System/IO/Path.Windows.cs Outdated
@jeffhandleyjeffhandley self-assigned this Jul 24, 2021
@steveberdy

Copy link
Copy Markdown
ContributorAuthor

Thank you @jeffhandley!

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.IOcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicated path.Contains('\0') check

5 participants

@steveberdy@jeffhandley@iSazonov@terrajobst@adamsitnik