Skip to content

Commit 604b2d2

Browse files
committed
Only scan drives that are ready to prevent a device not ready errpr
My grandpa's CD drive was not ready and caused the error
1 parent f6fd1cd commit 604b2d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DiasForGrandpa.WPF/ViewModels/OrganizerViewModel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private void Validate()
6767
// our code would bug out and accidently delete important files....
6868

6969
if (!Directory.Exists(App.Settings.DiaFolderInputPath) ||
70-
!DriveInfo.GetDrives().Any(x => x.VolumeLabel == App.Settings.DiaVolumeName) ||
70+
!DriveInfo.GetDrives().Where(x => x.IsReady).Any(x => x.VolumeLabel == App.Settings.DiaVolumeName) ||
7171
Directory.GetFiles(App.Settings.DiaFolderInputPath).Length == 0)
7272
{
7373
ErrorDialog.ShowError(

0 commit comments

Comments
 (0)