Sfoglia il codice sorgente

磁盘获取时排除光驱

zuohuaijun 3 anni fa
parent
commit
03fba1498a
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      Admin.NET/Admin.NET.Core/Util/ComputerUtil.cs

+ 1 - 1
Admin.NET/Admin.NET.Core/Util/ComputerUtil.cs

@@ -49,7 +49,7 @@ public static class ComputerUtil
         }
         else
         {
-            var driv = DriveInfo.GetDrives();
+            var driv = DriveInfo.GetDrives().Where(u => u.IsReady);
             foreach (var item in driv)
             {
                 var obj = new DiskInfo()