mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 07:29:21 +02:00
LCL: fixed CreateRelativePath e.g. ideintf/some.pas to ide
git-svn-id: trunk@23760 -
This commit is contained in:
parent
03419d8ebb
commit
e6d6601c17
@ -1325,19 +1325,18 @@ begin
|
||||
inc(BaseDirPos);
|
||||
end;
|
||||
end;
|
||||
UpDirCount:=0;
|
||||
if ((BaseDirPos>BaseDirLen) or (CmpBaseDirectory[BaseDirPos]=PathDelim))
|
||||
and ((p>FileNameLength) or (CmpFilename[p]=PathDelim)) then
|
||||
begin
|
||||
inc(DirCount);
|
||||
inc(BaseDirPos);
|
||||
end;
|
||||
end else
|
||||
inc(UpDirCount);
|
||||
if DirCount=0 then exit;
|
||||
if FilenameIsAbsolute(BaseDirectory) and (DirCount=1) then exit;
|
||||
|
||||
// calculate needed up directories
|
||||
UpDirCount:=0;
|
||||
if (BaseDirPos<=BaseDirLen) and (CmpBaseDirectory[BaseDirPos]<>PathDelim) then
|
||||
inc(UpDirCount);
|
||||
while (BaseDirPos<=BaseDirLen) do begin
|
||||
if (CmpBaseDirectory[BaseDirPos]=PathDelim) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user