Fix RootDriveInfo not show every drive

This commit is contained in:
2023-09-06 09:29:29 +02:00
parent 0e6c0c5cd5
commit 67484ba56b
9 changed files with 82 additions and 70 deletions

View File

@@ -31,14 +31,7 @@ public partial class RootDriveInfo
_name = container.Name;
_fullName = _name;
try
{
_fullName = container.FullName?.Path[(container.Provider.FullName!.Path.Length + 1)..] ?? _fullName;
}
catch
{
}
_fullName = driveInfo.Name;
Path = container.FullName ?? throw new NullReferenceException($"Container does not have a {nameof(FullName)}");