mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 22:12:25 +00:00
Merge pull request #295 from AnotherAltr/patch-1
Fix bugs in the crash unprepared device
This commit is contained in:
commit
4015493704
1 changed files with 4 additions and 1 deletions
|
|
@ -38,7 +38,10 @@ namespace Cosmos.Deploy.USB {
|
|||
var xDrives = DriveInfo.GetDrives().Where(q => q.DriveType == DriveType.Removable).ToArray();
|
||||
|
||||
lboxTarget.Items.Clear();
|
||||
foreach (var x in xDrives) {
|
||||
foreach (var x in xDrives)
|
||||
{
|
||||
if (!x.IsReady)
|
||||
continue;
|
||||
decimal xSize = x.TotalSize / (1000 * 1000 * 1000);
|
||||
lboxTarget.Items.Add(x.Name + " " + xSize.ToString("0.0") + " GiB " + x.DriveFormat + " [" + x.VolumeLabel + "]");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue