mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-11 18:51:41 +00:00
More path fixes.
This commit is contained in:
parent
b7809b0215
commit
bec9009bfc
1 changed files with 5 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#define COSMOSDEBUG
|
||||
//#define COSMOSDEBUG
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
|
@ -109,6 +109,8 @@ namespace Cosmos.System.Plugs.System.IO
|
|||
|
||||
public static string GetExtension(string aPath)
|
||||
{
|
||||
Global.mFileSystemDebugger.SendInternal("Path.GetExtension");
|
||||
|
||||
if (aPath == null)
|
||||
{
|
||||
return null;
|
||||
|
|
@ -117,6 +119,7 @@ namespace Cosmos.System.Plugs.System.IO
|
|||
CheckInvalidPathChars(aPath);
|
||||
int xLength = aPath.Length;
|
||||
int xNum = xLength;
|
||||
|
||||
while (--xNum >= 0)
|
||||
{
|
||||
char xC = aPath[xNum];
|
||||
|
|
@ -124,7 +127,7 @@ namespace Cosmos.System.Plugs.System.IO
|
|||
{
|
||||
if (xNum != xLength - 1)
|
||||
{
|
||||
return aPath.Substring(xNum + 1, xLength - xNum);
|
||||
return aPath.Substring(xNum, xLength - xNum);
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
|
|
|
|||
Loading…
Reference in a new issue