Better naming of blank-labeled discs

This commit is contained in:
Matt Nadareski
2019-05-12 21:18:07 -07:00
parent f372ec4ccd
commit ad3d26cdea

View File

@@ -723,7 +723,7 @@ namespace DICUI.Utilities
// Get the optical disc drives
List<Drive> discDrives = DriveInfo.GetDrives()
.Where(d => d.DriveType == DriveType.CDRom)
.Select(d => Drive.Optical(d.Name[0], (d.IsReady ? d.VolumeLabel : Template.DiscNotDetected), d.IsReady))
.Select(d => Drive.Optical(d.Name[0], (d.IsReady ? (string.IsNullOrWhiteSpace(d.VolumeLabel) ? "disc" : d.VolumeLabel) : Template.DiscNotDetected), d.IsReady))
.ToList();
// Add the two lists together and order