Open s5bug opened 11 months ago
FYI a good way to do a test on .NET Framework (ie to check old behavior) is http://sharplab.io (pick it from the drop-down)
It seems sharplab is not a fan of System.IO.Path
:
Unbreakable.AssemblyGuardException: Type System.IO.Path is not allowed.
using System;
using System.IO;
Console.WriteLine(
Path.Combine("\\\\?\\server1\\utilities\\\\filecomparer\\", "..\\..")
);
Tagging subscribers to this area: @dotnet/area-system-io See info in area-owners.md if you want to be subscribed.
Author: | s5bug |
---|---|
Assignees: | - |
Labels: | `area-System.IO`, `untriaged` |
Milestone: | - |
Path.GetPathRoot(@"\\?\server1\utilities\\filecomparer\")
returns empty string on .NET Framework. Path.GetFullPath(path, basePath)
isn't supported on .NET Framework. So this is likely not a regression.
What about Path.Combine
for .NET Framework, as shown in the example code?
What about Path.Combine
Path.Combine doesn't resolve relative segments, what you are referring to is being discussed in https://github.com/dotnet/runtime/issues/2162.
Added needs-breaking-change-doc-created
label because this issue has the breaking-change
label.
needs-breaking-change-doc-created
label.Tagging @dotnet/compat for awareness of the breaking change.
Description
File path formats on Windows systems states:
The way this reads to me is that
\\?\server1\utilities\\
should be considered the "root" of\\?\server1\utilities\\filecomparer\
.Specifically, the documentation states
server1\utilities
"This seems to not be respected:
Reproduction Steps
Expected behavior
Actual behavior
Regression?
I don't know how to test old .NET versions, I'm not a long-time .NET user.
Known Workarounds
No response
Configuration
I would be pretty sure it's Windows (Path)-specific.
Other information
No response