-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Unblock paths > MAX_PATH without extended syntax. #3001
Conversation
146c01e
to
4da74ba
Compare
@@ -9,10 +10,30 @@ partial class Interop | |||
{ | |||
partial class mincore | |||
{ | |||
/// <summary> | |||
/// WARNING: This overload does not implicitly handle long paths. | |||
/// </summary> |
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.
Let's rename it then. It's strange to have two overloads so similar and yet with so different behavior.
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.
Do you have any suggestions for naming? GetFullPathNameNoLongPath? This one in particular is used for the stack allocating code in PathHelper (all under MAX_PATH).
Like I mentioned, I intend to pass through these P/Invokes and normalize the naming. I want to drop the "W", use "Private" (anything better for that?), add comments on the privates to avoid leaking in other P/Invoke wrappers.
4da74ba
to
50a3b1a
Compare
{ | ||
// There is no valid way to specify a relative path with two initial slashes | ||
return !((path[1] == '\\') || (path[1] == '/')); | ||
return !(IsDirectorySeparator(Path.DirectorySeparatorChar)); |
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.
Shouldn't this be !IsDirectorySeparator(path[1])
? It is probably worth making sure we have test coverage that would have caught this.
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.
Yeah :/ I'll add the test for this one.
Other then the one issue and the renaming which you will be doing in a follow-up. The change looks good to me. |
Also allow directories up to max component length (255) as opening does not require extended syntax.
50a3b1a
to
496c66e
Compare
Unblock paths > MAX_PATH without extended syntax.
…hecks Unblock paths > MAX_PATH without extended syntax. Commit migrated from dotnet/corefx@f0fce53
Also allow directories up to max component length (255) as opening does not
require extended syntax.
@stephentoub, @weshaggard, @Priya91