1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-23 18:18:00 +02:00

Make GetExtension failure softer

This commit is contained in:
Brian Fiete 2022-02-28 11:28:11 -08:00
parent 90735e3bf8
commit 5fd0e6d0c8

View file

@ -301,10 +301,10 @@ namespace System.IO
outFileName.Append(inPath, lastSlash + 1);
}
public static Result<void> GetExtension(StringView inPath, String outExt)
public static bool GetExtension(StringView inPath, String outExt)
{
if (inPath.IsEmpty)
return .Err;
return false;
CheckInvalidPathChars(inPath);
@ -316,7 +316,7 @@ namespace System.IO
if (i != inPath.Length - 1)
{
outExt.Append(inPath.Substring(i, inPath.Length - i));
return .Ok;
return true;
}
else
break;
@ -325,7 +325,7 @@ namespace System.IO
break;
}
return .Err;
return false;
}
public static bool HasExtension(StringView path)