From 731d4cb6747116cf2af98f773be0c3a3ba39f584 Mon Sep 17 00:00:00 2001 From: Mitch Capper Date: Fri, 12 Sep 2025 03:11:51 -0700 Subject: [PATCH] Prevent exception if root FS doesn't exist (ie a swap drive) also show the TypeAsString as it can often contain additional info. --- Utilities/DiskDump/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Utilities/DiskDump/Program.cs b/Utilities/DiskDump/Program.cs index a0b18ead4..67524ca4e 100644 --- a/Utilities/DiskDump/Program.cs +++ b/Utilities/DiskDump/Program.cs @@ -203,7 +203,7 @@ protected override void DoRun() foreach (var vol in volMgr.GetLogicalVolumes()) { Console.WriteLine($" {vol.Identity}"); - Console.WriteLine($" BIOS Type: {vol.BiosType:X2} [{BiosPartitionTypes.ToString(vol.BiosType)}]"); + Console.WriteLine($" BIOS Type: {vol.BiosType:X2} [{BiosPartitionTypes.ToString(vol.BiosType)}] {vol.TypeAsString}"); Console.WriteLine($" Status: {vol.Status}"); Console.WriteLine($" Size: {vol.Length}"); Console.WriteLine($" Disk Geometry: {vol.PhysicalGeometry}"); @@ -273,7 +273,8 @@ protected override void DoRun() { Console.WriteLine($" {fsi.Name} Volume Label: {fs.VolumeLabel}"); Console.WriteLine($" Files ({fsi.Name})..."); - ShowDir(fs.Root, 6); + if (fs.Root.Exists) + ShowDir(fs.Root, 6); } Console.WriteLine();