From 78502324e712245e17fc54351b732a62dd80736e Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Sun, 8 Feb 2026 13:12:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dls=E9=97=AE=E9=A2=98=EF=BC=88?= =?UTF-8?q?=E4=BD=86=E6=B2=A1=E6=9C=89=E6=88=90=E5=8A=9F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/FileSystem.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/System/FileSystem.cs b/System/FileSystem.cs index 9a86bc5..132d2d5 100644 --- a/System/FileSystem.cs +++ b/System/FileSystem.cs @@ -28,7 +28,14 @@ namespace CMLeonOS public string CurrentDirectory { - get { return currentDirectory; } + get + { + if (currentDirectory == @"0:\") + { + return "."; + } + return currentDirectory; + } } public void ChangeDirectory(string path) @@ -89,7 +96,8 @@ namespace CMLeonOS if (Directory.Exists(fullPath)) { // 列出当前目录下的文件和子目录 - Console.WriteLine($"Contents of {path}:"); + string displayPath = path == "." ? CurrentDirectory : path; + Console.WriteLine($"Contents of {displayPath}:"); // 列出子目录 try