File fixes.

This commit is contained in:
Ottermandias 2022-03-18 10:07:59 +01:00
parent 0ba0c6d057
commit 5ed80c753f
2 changed files with 3 additions and 5 deletions

View file

@ -70,8 +70,7 @@ public readonly struct Utf8GamePath : IEquatable< Utf8GamePath >, IComparable< U
return true;
}
var substring = s!.Replace( '\\', '/' );
substring.TrimStart( '/' );
var substring = s!.Replace( '\\', '/' ).TrimStart( '/' );
if( substring.Length > MaxGamePathLength )
{
return false;
@ -99,7 +98,7 @@ public readonly struct Utf8GamePath : IEquatable< Utf8GamePath >, IComparable< U
return false;
}
var substring = file.FullName[ baseDir.FullName.Length.. ];
var substring = file.FullName[ ( baseDir.FullName.Length + 1 ).. ];
return FromString( substring, out path, toLower );
}