# revisions: 44312,44313

git-svn-id: branches/fixes_3_2@45705 -
This commit is contained in:
marco 2020-06-27 20:47:37 +00:00
parent 7717e2c92e
commit a0f699ac3e
2 changed files with 13 additions and 7 deletions

View File

@ -29,7 +29,7 @@ function ExtractShortPathName(Const FileName : PathStr) : PathStr;
function ExpandFileName (Const FileName : PathStr): PathStr;
function ExpandFileNameCase (const FileName: PathStr; out MatchFound: TFilenameCaseMatch): PathStr;
function ExpandUNCFileName (Const FileName : PathStr): PathStr;
function ExtractRelativePath (Const BaseName,DestNAme : PathStr): PathStr;
function ExtractRelativePath (Const BaseName,DestName : PathStr): PathStr;
function IncludeTrailingPathDelimiter(Const Path : PathStr) : PathStr;
function IncludeTrailingBackslash(Const Path : PathStr) : PathStr;
function ExcludeTrailingBackslash(Const Path: PathStr): PathStr;

View File

@ -1225,9 +1225,12 @@ begin
begin
T:=SubString(LastSep);
// Writeln('Examining >',T,'< at pos,',LastSep,' till pos ',Sep);
MaybeGrow(Len);
Result[Len]:=T;
Inc(Len);
If (T<>'') or (not (TStringSplitOptions.ExcludeEmpty=Options)) then
begin
MaybeGrow(Len);
Result[Len]:=T;
Inc(Len);
end;
end;
SetLength(Result,Len);
end;
@ -1308,9 +1311,12 @@ begin
begin
T:=SubString(LastSep);
// Writeln('Examining >',T,'< at pos,',LastSep,' till pos ',Sep);
MaybeGrow(Len);
Result[Len]:=T;
Inc(Len);
If (T<>'') or (not (TStringSplitOptions.ExcludeEmpty=Options)) then
begin
MaybeGrow(Len);
Result[Len]:=T;
Inc(Len);
end;
end;
SetLength(Result,Len);
end;