-
Notifications
You must be signed in to change notification settings - Fork 82
Remove support for relative path starting with / #148
Conversation
Hi @pakrym, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! The agreement was validated by .NET Foundation and real humans are currently evaluating your PR. TTYL, DNFBOT; |
You might also want to try this with Mvc. We pass paths starting with / all the time to the file system. |
Might also want to do something similar with |
This also requires an announcement |
@@ -25,7 +25,7 @@ public void ExistingFilesReturnTrue() | |||
Assert.NotNull(info); | |||
Assert.True(info.Exists); | |||
|
|||
info = provider.GetFileInfo("/File.txt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a negative test making sure that passing /file
does the appropriate thing on each OS.
Made same changes to embedded file system and added negative tests |
@pakrym What's the behavior for Windows absolute paths such as |
We returning NoopFileInfo |
{ | ||
subpath = subpath.Substring(1); | ||
} | ||
|
||
// Non-hierarchal. | ||
if (!subpath.Equals(string.Empty)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you combine this with the condition at Line 94?
We decided to punt this and deal with the inconsistency. |
#104
@davidfowl @CesarBS