mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-06 07:50:47 +01:00
* fixed ExtractFileExt broken after previous commit
git-svn-id: trunk@10107 -
This commit is contained in:
parent
519b11dba7
commit
496212d5c4
@ -29,7 +29,7 @@ begin
|
||||
EndSep:=AllowDirectorySeparators+AllowDriveSeparators+[ExtensionSeparator];
|
||||
while (I > 0) and not(FileName[I] in EndSep) do
|
||||
Dec(I);
|
||||
if (I = 0) or (FileName[I] <> '.') then
|
||||
if (I = 0) or (FileName[I] <> ExtensionSeparator) then
|
||||
I := Length(FileName)+1;
|
||||
Result := Copy(FileName, 1, I - 1) + Extension;
|
||||
end;
|
||||
@ -104,10 +104,10 @@ var
|
||||
EndSep : Set of Char;
|
||||
begin
|
||||
I := Length(FileName);
|
||||
EndSep:=AllowDirectorySeparators+AllowDriveSeparators;
|
||||
EndSep:=AllowDirectorySeparators+AllowDriveSeparators+[ExtensionSeparator];
|
||||
while (I > 0) and not (FileName[I] in EndSep) do
|
||||
Dec(I);
|
||||
if (I > 0) and (FileName[I] = '.') then
|
||||
if (I > 0) and (FileName[I] = ExtensionSeparator) then
|
||||
Result := Copy(FileName, I, MaxInt)
|
||||
else
|
||||
Result := '';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user