Jelajahi Sumber

Do not try to serve volumes that are not operational

Tal Aloni 8 tahun lalu
induk
melakukan
bdb205bb57
1 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 5 0
      ISCSIConsole/Win32/SelectVolumeForm.cs

+ 5 - 0
ISCSIConsole/Win32/SelectVolumeForm.cs

@@ -56,6 +56,11 @@ namespace ISCSIConsole
             if (listVolumes.SelectedItems.Count > 0)
             {
                 Volume selectedVolume = (Volume)listVolumes.SelectedItems[0].Tag;
+                if (selectedVolume is DynamicVolume && !((DynamicVolume)selectedVolume).IsOperational)
+                {
+                    MessageBox.Show("The selected volume is not operational", "Error");
+                    return;
+                }
                 if (!chkReadOnly.Checked)
                 {
                     Guid? volumeGuid = WindowsVolumeHelper.GetWindowsVolumeGuid(selectedVolume);