git-svn-id: https://svn.code.sf.net/p/kolmck/code@47 91bb2d04-0c0c-4d2d-88a5-bbb6f4c1fa07
This commit is contained in:
17
KOL.pas
17
KOL.pas
@ -22385,15 +22385,16 @@ asm
|
||||
end;
|
||||
{$ELSE} //Pascal
|
||||
function ExtractFilePath(const Path: KOLString): KOLString;
|
||||
//var I : Integer;
|
||||
var P, P0: PKOLChar;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
P0 := PKOLChar( Path );
|
||||
P := __DelimiterLast( P0, ':\/' );
|
||||
if P^ = #0 then
|
||||
Result := ''
|
||||
else
|
||||
Result := Copy( Path, 1, P - P0 + 1 );
|
||||
for i := Length(Path) - 1 downto 1 do begin
|
||||
if (Path[i] = '\') then begin
|
||||
Result := Copy(Path, 1, i);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
Result := Path;
|
||||
end;
|
||||
{$ENDIF ASM_VERSION}
|
||||
|
||||
|
Reference in New Issue
Block a user