mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-22 05:48:37 +00:00
Fix fat Directory.Exists, so it works with case insensitive match as well.
This commit is contained in:
parent
ebba2f13b0
commit
7e481aaee3
4 changed files with 13 additions and 3 deletions
|
|
@ -24,7 +24,7 @@ namespace SentinelKernel
|
|||
try
|
||||
{
|
||||
var xRoot = Path.GetPathRoot(@"0:\test");
|
||||
bool xTest = Directory.Exists("0:\\TEST");
|
||||
bool xTest = Directory.Exists("0:\\test");
|
||||
Console.WriteLine("After test");
|
||||
if (xTest)
|
||||
{
|
||||
|
|
@ -41,7 +41,7 @@ namespace SentinelKernel
|
|||
Console.WriteLine("Exception occurred:");
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
|
||||
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace SentinelKernel.System.FileSystem
|
|||
private static Debugger mDebugger = new Debugger("FAT", "Debug");
|
||||
public static void Debug(string message)
|
||||
{
|
||||
//mDebugger.Send("FAT Debug: " + message);
|
||||
mDebugger.Send("FAT Debug: " + message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -243,6 +243,10 @@ namespace SentinelKernel.System.FileSystem.VFS
|
|||
for (int j = 0; j < xListing.Count; j++)
|
||||
{
|
||||
var xListingItem = xListing[j];
|
||||
Console.Write("xListingItem.Name: ");
|
||||
Console.WriteLine(xListingItem.Name);
|
||||
Console.Write("xPathPart: ");
|
||||
Console.WriteLine(xPathPart);
|
||||
if (String.Equals(xListingItem.Name, xPathPart, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (xListingItem is Listing.Directory)
|
||||
|
|
|
|||
|
|
@ -144,6 +144,12 @@ namespace Cosmos.Core.Plugs {
|
|||
|
||||
public static bool Equals(string aThis, string aThat, StringComparison aComparison) {
|
||||
#warning TODO: implement
|
||||
if (aComparison == StringComparison.OrdinalIgnoreCase)
|
||||
{
|
||||
var xLowerThis = aThis.ToLower();
|
||||
var xLowerThat = aThat.ToLower();
|
||||
return EqualsHelper(xLowerThis, xLowerThat);
|
||||
}
|
||||
return EqualsHelper(aThis,
|
||||
aThat);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue