Dial back aggressive checks in Path (#16447)
authorJeremy Kuhne <jeremy.kuhne@microsoft.com>
Wed, 21 Feb 2018 18:44:44 +0000 (10:44 -0800)
committerGitHub <noreply@github.com>
Wed, 21 Feb 2018 18:44:44 +0000 (10:44 -0800)
commit1709ce9e53590adb5d649ddf99fcddf652b2fbc4
treea69b4db18ee2dfba6b962cbcff54b9eae7ec3747
parent8ee398e52432eae5ce4722d4e621f81ad12d6591
Dial back aggressive checks in Path (#16447)

* 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)
src/mscorlib/shared/System/IO/Path.Unix.cs
src/mscorlib/shared/System/IO/Path.Windows.cs
src/mscorlib/shared/System/IO/Path.cs
src/mscorlib/shared/System/IO/PathHelper.Windows.cs
src/mscorlib/shared/System/IO/PathInternal.Unix.cs
src/mscorlib/shared/System/IO/PathInternal.Windows.cs
src/mscorlib/shared/System/IO/PathInternal.cs