mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-24 18:48:01 +02:00
Make GetExtension failure softer
This commit is contained in:
parent
90735e3bf8
commit
5fd0e6d0c8
1 changed files with 4 additions and 4 deletions
|
@ -301,10 +301,10 @@ namespace System.IO
|
||||||
outFileName.Append(inPath, lastSlash + 1);
|
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)
|
if (inPath.IsEmpty)
|
||||||
return .Err;
|
return false;
|
||||||
|
|
||||||
CheckInvalidPathChars(inPath);
|
CheckInvalidPathChars(inPath);
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ namespace System.IO
|
||||||
if (i != inPath.Length - 1)
|
if (i != inPath.Length - 1)
|
||||||
{
|
{
|
||||||
outExt.Append(inPath.Substring(i, inPath.Length - i));
|
outExt.Append(inPath.Substring(i, inPath.Length - i));
|
||||||
return .Ok;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
@ -325,7 +325,7 @@ namespace System.IO
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return .Err;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool HasExtension(StringView path)
|
public static bool HasExtension(StringView path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue