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

Conversation

@JeremyKuhne
Copy link
Member

Aggressive checks are preventing crossplat and extended Windows solutions. This change:

  • Doesn't throw on empty paths fro GetDirectoryName, GetPathRoot
  • Doesn't consider colon when looking at path segments on Windows
  • Moves non-shared code out of PathInternal
  • Fix span GetDirectoryName to handle multiple separators

I've marked this as no merge- I'll be linking in the necessary test fixes (not many).

Aggressive checks are preventing crossplat and extended Windows solutions. This change:

- Doesn't throw on empty paths fro GetDirectoryName, GetPathRoot
- Doesn't consider colon when looking at path segments on Windows
- Moves non-shared code out of PathInternal
- Fix span GetDirectoryName to handle multiple separators

// The resulting string is null if path is null. If the path is empty or
// only contains whitespace characters an ArgumentException gets thrown.
public static string GetPathRoot(string path)
Copy link
Member

Choose a reason for hiding this comment

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

comment above is now wrong.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks.

Copy link

@maryamariyan maryamariyan left a comment

Choose a reason for hiding this comment

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

LGTM

Remove other usages of PathSkip (related to dotnet#16311)
JeremyKuhne added a commit to dotnet/corefx that referenced this pull request Feb 21, 2018
* Test updates for dotnet/coreclr#16447

* Move variant test to own method.
Add GetFileName tests for volume separators.
@JeremyKuhne
Copy link
Member Author

Test updates were merged: dotnet/corefx#27270

@JeremyKuhne JeremyKuhne removed the * NO MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) label Feb 21, 2018
@JeremyKuhne
Copy link
Member Author

@dotnet-bot test Tizen armel Cross Checked Innerloop Build and Test

Timed out

@JeremyKuhne JeremyKuhne merged commit 1709ce9 into dotnet:master Feb 21, 2018
@JeremyKuhne JeremyKuhne deleted the dialback1 branch February 21, 2018 18:44
dotnet-bot pushed a commit to dotnet/corert that referenced this pull request Feb 21, 2018
* Dial back aggressive checks in Path

Aggressive checks are preventing crossplat and extended Windows solutions. This change:

- Doesn't throw on empty paths fro GetDirectoryName, GetPathRoot
- Doesn't consider colon when looking at path segments on Windows
- Moves non-shared code out of PathInternal
- Fix span GetDirectoryName to handle multiple separators

* Comment updates

* Check for valid drive letter with PathRoot
Remove other usages of PathSkip (related to #16311)

Signed-off-by: dotnet-bot <[email protected]>
JeremyKuhne added a commit to dotnet/corert that referenced this pull request Feb 21, 2018
* Dial back aggressive checks in Path

Aggressive checks are preventing crossplat and extended Windows solutions. This change:

- Doesn't throw on empty paths fro GetDirectoryName, GetPathRoot
- Doesn't consider colon when looking at path segments on Windows
- Moves non-shared code out of PathInternal
- Fix span GetDirectoryName to handle multiple separators

* Comment updates

* Check for valid drive letter with PathRoot
Remove other usages of PathSkip (related to #16311)

Signed-off-by: dotnet-bot <[email protected]>
@jkotas
Copy link
Member

jkotas commented Feb 22, 2018

@Anipik The mirror skipped this PR, and also dotnet/corefx#27328 . Could you please take a look ?

@Anipik
Copy link

Anipik commented Feb 22, 2018

@jkotas I will add the commit after dotnet/corefx#27381 has merged

@ahsonkhan
Copy link

I will add the commit after dotnet/corefx#27381 has merged

It has been merged.

@jkotas
Copy link
Member

jkotas commented Feb 23, 2018

@Anipik This one was still not mirrored yet. Could you please take a look?

dotnet-bot pushed a commit to dotnet/corefx that referenced this pull request Feb 23, 2018
* Dial back aggressive checks in Path

Aggressive checks are preventing crossplat and extended Windows solutions. This change:

- Doesn't throw on empty paths fro GetDirectoryName, GetPathRoot
- Doesn't consider colon when looking at path segments on Windows
- Moves non-shared code out of PathInternal
- Fix span GetDirectoryName to handle multiple separators

* Comment updates

* Check for valid drive letter with PathRoot
Remove other usages of PathSkip (related to #16311)

Signed-off-by: dotnet-bot-corefx-mirror <[email protected]>
stephentoub pushed a commit to dotnet/corefx that referenced this pull request Feb 23, 2018
* Dial back aggressive checks in Path

Aggressive checks are preventing crossplat and extended Windows solutions. This change:

- Doesn't throw on empty paths fro GetDirectoryName, GetPathRoot
- Doesn't consider colon when looking at path segments on Windows
- Moves non-shared code out of PathInternal
- Fix span GetDirectoryName to handle multiple separators

* Comment updates

* Check for valid drive letter with PathRoot
Remove other usages of PathSkip (related to #16311)

Signed-off-by: dotnet-bot-corefx-mirror <[email protected]>
kbaladurin pushed a commit to kbaladurin/corert that referenced this pull request Mar 15, 2018
* Dial back aggressive checks in Path

Aggressive checks are preventing crossplat and extended Windows solutions. This change:

- Doesn't throw on empty paths fro GetDirectoryName, GetPathRoot
- Doesn't consider colon when looking at path segments on Windows
- Moves non-shared code out of PathInternal
- Fix span GetDirectoryName to handle multiple separators

* Comment updates

* Check for valid drive letter with PathRoot
Remove other usages of PathSkip (related to #16311)

Signed-off-by: dotnet-bot <[email protected]>
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Test updates for dotnet/coreclr#16447

* Move variant test to own method.
Add GetFileName tests for volume separators.


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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants