Skip to content

Commit

Permalink
Explain why we're not just always calling Path.GetFullPath
Browse files Browse the repository at this point in the history
  • Loading branch information
Metapyziks committed Jul 25, 2024
1 parent f63488d commit e12f214
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Zio/FileSystems/PhysicalFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,8 @@ protected override UPath ConvertPathFromInternalImpl(string innerPath)
if (innerPath.StartsWith(@"\\", StringComparison.Ordinal) || innerPath.StartsWith(@"\?", StringComparison.Ordinal))
throw new NotSupportedException($"Path starting with `\\\\` or `\\?` are not supported -> `{innerPath}` ");

// We want to avoid using Path.GetFullPath unless absolutely necessary,
// because it can change the case of already rooted paths that contain a ~
var absolutePath = HasWindowsVolumeLabel(innerPath) ? innerPath : Path.GetFullPath(innerPath);

// Assert that Path.GetFullPath returned the format we expect
Expand Down

0 comments on commit e12f214

Please sign in to comment.