소스 검색

磁盘获取时排除光驱

zuohuaijun 3 년 전
부모
커밋
03fba1498a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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()