From 355e2be1d45f789a99bb5c02383744253df2f822 Mon Sep 17 00:00:00 2001 From: SzymekkYT <69077038+Szymekk44@users.noreply.github.com> Date: Sat, 21 Sep 2024 22:09:41 +0200 Subject: [PATCH] Added Debug --- source/Cosmos.System2/FileSystem/Disk.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/Cosmos.System2/FileSystem/Disk.cs b/source/Cosmos.System2/FileSystem/Disk.cs index e64d6e1867..cc7f238189 100644 --- a/source/Cosmos.System2/FileSystem/Disk.cs +++ b/source/Cosmos.System2/FileSystem/Disk.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.Design.Serialization; +using System.Linq; using System.Net.Mime; using System.Text; using Cosmos.HAL; @@ -326,11 +327,17 @@ public void MountPartition(int index) Array.Copy(volumeLabelBytes, trimmedVolumeLabelBytes, actualLength); Label = Encoding.UTF8.GetString(trimmedVolumeLabelBytes); global::System.Console.WriteLine("Label (saved): " + Label); + if(Label.Length == 0) + { + Label = VFSManager.GetNextFilesystemLetter(); + global::System.Console.WriteLine("Label empty."); + global::System.Console.WriteLine("Generated new Label: " + Label); + } } else { Label = VFSManager.GetNextFilesystemLetter(); - global::System.Console.WriteLine("Generated new Label " + Label); + global::System.Console.WriteLine("Generated new Label: " + Label); } string xRootPath = string.Concat(Label, VFSBase.VolumeSeparatorChar, VFSBase.DirectorySeparatorChar);