diff --git a/DICUI.Avalonia/MainWindow.axaml.cs b/DICUI.Avalonia/MainWindow.axaml.cs index 1b729565..7baffb5b 100644 --- a/DICUI.Avalonia/MainWindow.axaml.cs +++ b/DICUI.Avalonia/MainWindow.axaml.cs @@ -135,7 +135,9 @@ namespace DICUI.Avalonia { ViewModels.LoggerViewModel.VerboseLog("Trying to detect media type for drive {0}.. ", drive.Letter); CurrentMediaType = Validators.GetMediaType(drive); - ViewModels.LoggerViewModel.VerboseLogLn(CurrentMediaType == null ? "unable to detect." : ("detected " + CurrentMediaType.LongName() + ".")); + ViewModels.LoggerViewModel.VerboseLogLn(CurrentMediaType == null ? "unable to detect, defaulting to CD-ROM." : ($"detected {CurrentMediaType.LongName()}.")); + if (CurrentMediaType == null) + CurrentMediaType = MediaType.CDROM; } } } diff --git a/DICUI/Windows/MainWindow.xaml.cs b/DICUI/Windows/MainWindow.xaml.cs index 9acba402..75b74f79 100644 --- a/DICUI/Windows/MainWindow.xaml.cs +++ b/DICUI/Windows/MainWindow.xaml.cs @@ -124,7 +124,9 @@ namespace DICUI.Windows { ViewModels.LoggerViewModel.VerboseLog("Trying to detect media type for drive {0}.. ", drive.Letter); CurrentMediaType = Validators.GetMediaType(drive); - ViewModels.LoggerViewModel.VerboseLogLn(CurrentMediaType == null ? "unable to detect." : ("detected " + CurrentMediaType.LongName() + ".")); + ViewModels.LoggerViewModel.VerboseLogLn(CurrentMediaType == null ? "unable to detect, defaulting to CD-ROM." : ($"detected {CurrentMediaType.LongName()}.")); + if (CurrentMediaType == null) + CurrentMediaType = MediaType.CDROM; } } }