Compare commits

...

2 Commits

Author SHA1 Message Date
Leonmmcoset
2e8ef4ef91 更新Cosmos+弃用UEFI
弃用UEFI原因: UEFI不支持VGA Text Mode
2026-02-25 18:52:53 +08:00
Leonmmcoset
0724502225 盘符操控 2026-02-25 16:51:27 +08:00
6 changed files with 37 additions and 16 deletions

2
.gitignore vendored
View File

@@ -56,3 +56,5 @@ coverage/
# Release files
*.release
main.map

View File

@@ -1 +1 @@
2026-02-25 15:29:49
2026-02-25 18:46:09

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
@@ -20,15 +20,17 @@
<Description>Use VMware Player or Workstation to deploy and debug.</Description>
<PxeInterface>192.168.0.8</PxeInterface>
<CompressionType>Gzip</CompressionType>
<BinFormat>Elf</BinFormat>
<BinFormat>Bin</BinFormat>
<DebugEnabled>False</DebugEnabled>
<CompileVBEMultiboot>False</CompileVBEMultiboot>
<RemoveBootDebugOutput>False</RemoveBootDebugOutput>
<RemoveBootDebugOutput>True</RemoveBootDebugOutput>
<CosmosDisableDebugger>true</CosmosDisableDebugger>
<CosmosDebugLevel>None</CosmosDebugLevel>
<OptimizationLevel>2</OptimizationLevel>
<VBEResolution>800x600x32</VBEResolution>
<RunPostBuildEvent>Always</RunPostBuildEvent>
<Timeout>1</Timeout>
<UseUEFI>False</UseUEFI>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -89,7 +91,7 @@
<PackageReference Include="Cosmos.System2_Plugs" Version="0.1.0-localbuild20260201071815" />
<PackageReference Include="CosmosFtpServer" Version="1.0.9" />
<PackageReference Include="CosmosHttp" Version="1.0.4" />
<PackageReference Include="IL2CPU.API" Version="0.1.0-localbuild20260203125852" />
<PackageReference Include="IL2CPU.API" Version="0.1.0-localbuild20260225062300" />
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">

View File

@@ -1 +1 @@
9b783e0
0724502

View File

@@ -71,8 +71,8 @@ namespace CMLeonOS
}
Console.Clear();
Console.WriteLine("Kernel load done!");
Console.WriteLine(@"----------------------------------------------------------");
// Console.WriteLine("Kernel load done!");
// Console.WriteLine(@"----------------------------------------------------------");
Console.WriteLine(@" ____ __ __ _ ___ ____ ");
Console.WriteLine(@" / ___| \/ | | ___ ___ _ __ / _ \/ ___| ");
Console.WriteLine(@" | | | |\/| | | / _ \/ _ \| '_ \| | | \___ \ ");

View File

@@ -16,7 +16,7 @@ namespace CMLeonOS
private static bool ContainsInvalidChars(string input)
{
char[] invalidChars = { '<', '>', ':', '"', '|', '?', '*' };
char[] invalidChars = { '<', '>', '"', '|', '?', '*' };
foreach (char c in invalidChars)
{
if (input.Contains(c.ToString()))
@@ -59,6 +59,18 @@ namespace CMLeonOS
return;
}
if (path == @"0:\")
{
currentDirectory = @"0:\";
return;
}
if (path == @"1:\")
{
currentDirectory = @"1:\";
return;
}
string fullPath = GetFullPath(path);
try
@@ -414,6 +426,11 @@ namespace CMLeonOS
return path;
}
if (path.StartsWith(@"1:\"))
{
return path;
}
if (path == ".")
{
return currentDirectory;
@@ -421,16 +438,16 @@ namespace CMLeonOS
if (path == "..")
{
if (currentDirectory == @"0:\")
if (currentDirectory == @"0:\" || currentDirectory == @"1:\")
{
return @"0:\";
return currentDirectory;
}
else
{
int lastSlash = currentDirectory.LastIndexOf('\\');
if (lastSlash == 2) // 0:\
if (lastSlash == 2) // 0:\ or 1:\
{
return @"0:\";
return currentDirectory.Substring(0, 3);
}
else
{
@@ -441,7 +458,7 @@ namespace CMLeonOS
if (path.StartsWith("../") || path.StartsWith("..\\"))
{
if (currentDirectory == @"0:\")
if (currentDirectory == @"0:\" || currentDirectory == @"1:\")
{
Console.WriteLine("Error: Cannot go above root directory");
return currentDirectory;
@@ -472,9 +489,9 @@ namespace CMLeonOS
for (int i = 0; i < level; i++)
{
int lastSlash = resultPath.LastIndexOf('\\');
if (lastSlash == 2) // 0:\
if (lastSlash == 2) // 0:\ or 1:\
{
resultPath = @"0:\";
resultPath = resultPath.Substring(0, 3);
}
else
{