Browse Source
Set Path as name if there's no volume label.
pull/2995/head
Jumar Macato
7 years ago
No known key found for this signature in database
GPG Key ID: B19884DAC3A5BF3F
1 changed files with
2 additions and
1 deletions
-
src/Windows/Avalonia.Win32/WindowsMountedVolumeInfoListener.cs
|
|
|
@ -35,7 +35,8 @@ namespace Avalonia.Win32 |
|
|
|
.Where(p => p.IsReady) |
|
|
|
.Select(p => new MountedVolumeInfo() |
|
|
|
{ |
|
|
|
VolumeLabel = p.VolumeLabel, |
|
|
|
VolumeLabel = string.IsNullOrEmpty(p.VolumeLabel.Trim()) ? p.RootDirectory.FullName |
|
|
|
: p.VolumeLabel, |
|
|
|
VolumePath = p.RootDirectory.FullName, |
|
|
|
VolumeSizeBytes = (ulong)p.TotalSize |
|
|
|
}) |
|
|
|
|